How to I forward my domain elsewhere?
July 27, 2011 3:07 PM   Subscribe

MeFi web me forward my domain to another site.

When someone enters in my domain name I would like it to automatically forward to another site (for example: would directly to

I was able to change the DNS host and when you type the address without www it directly goes to the desired site. However, when you add the www it forwards to a "can't find the server page".

My domain is hosted on google sites, the site I want to forward to is not. I've posted this on several google forums to no avail.

Help me hive!
posted by ieatwords to Computers & Internet (3 answers total) 1 user marked this as a favorite
I think the "adding the www" problem is a separate DNS issue. Check with your DNS folks and make sure your A records are set up OK.
posted by circular at 3:35 PM on July 27, 2011

The easiest way to redirect a domain is using your domain registrar's control panel's redirection setting. Typically this is a per subdomain setting and probably you will have to change www and @ separately.
posted by Foci for Analysis at 3:41 PM on July 27, 2011

I've run into this on using hosting at - they recommend setting a 'hard' canonical name for the site ( and redirecting to the first site - it's faster and makes Google happier with only one site entity under that name...)
If you don't go that route:

Create an .htaccess file: add the following lines

RewriteEngine on
# Don't do this. The setting above is preferred.
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/robots.txt$
RewriteRule ^.*$ http://www\.example\.com%{REQUEST_URI} [R=301,L]

The above code will cause any request sent to or to be redirected to, the only exception being a request for robots.txt because some robots will ignore robots.txt when it is a redirection.
posted by HLD at 3:55 PM on July 27, 2011 [2 favorites]

« Older Are videos of wedding ceremony's fair use?   |   How to install a child theme in WordPress. Newer »
This thread is closed to new comments.