Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just set up a Mac Mini with OS X Lion Server to host my own website. I have registered multiple domain names, but I would like the user to be automatically redirected to my main domain name if they type in one of the others (i.e. if the user types in the URL will be forwarded instantly to In the Web settings of, you can easily add additional domains (which works) but it does not change the URL in the browser to It keeps whilst still displaying the correct pages.

Does the redirects or alias options do what I want? I can't seem to work out how to use them (there seems to be no documentation that I can find).

In Redirects, you need to enter:

  1. 'Redirect Type' (Exact Match or Regular Expression)
  2. 'Redirect Path'
  3. 'Destination URL'
  4. 'Redirect Status' (Original was permanently moved, etc)

In Alias, you need to enter:

  1. 'Alias Type' (Exact Match or Regular Expression)
  2. 'Alias Path'
  3. 'Destination Folder'

Any help would be great.

share|improve this question

The best way to do this is with a redirect -- redirects basically tell the browser "you don't want this URL, you want this one instead (as opposed to an alias, which serves different files without any indication to the browser). If you want what I'd call a full redirect (i.e. ->, you need to create a second entry in the "Web Sites" list named, and in it create a redirect like this:

Redirect Type: Regular Expression
Redirect Path: (.*)$
Destination URL:$1
Redirect Status: Original has moved permanently

DO NOT add this redirect to the primary web site, or it'll redirect to itself in an infinite loop. If you aren't using SSL, you don't need to create additional web sites for each additional domain name, just create one and add the others (,, etc) to its "Additional Domains" list. If you are using SSL, you'll have to create a separate entry in the web sites list so that you can give each one its own SSL certificate (and even that may not work right unless you use different IP addresses for each name -- there are inherent problems serving multiple SSL certs on a single IP address).

share|improve this answer
Thanks Gordon, that worked perfectly. – pheedsta Apr 22 '12 at 23:36
Please accept this answer if correct. – David Houde Apr 26 '13 at 9:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.