wiki:faq/domain/canonical-web-address

Version 1 (modified by Jamie McClelland, 16 years ago) ( diff )

--

I have multiple domain names that point to my web site - how to I make it so my preferred domain always appears in the browser address bar?

Many of us have multiple domain names that point to the same web site. For example, you can access our web site by going to mayfirst.org, or www.mayfirst.org, or www.people-link.net, etc.

However, we want people to always see mayfirst.org in the address bar of the browser.

We do that by adding the following lines to the Web Config settings in the Members Control Panel:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^mayfirst\.org$ [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://mayfirst.org/$1 [L,R]

You can do the same by replacing mayfirst.org with the domain name you want your web site to display in the address bar of the browser.

Note: See TracWiki for help on using the wiki.