Skip to main content

Custom Domains Using 301 Redirect In DNS Setup

When you setup your Google Custom Domain, the instruction for the DNS setup is rather basic.
Add one or more "CNAME" records. Point "www.mydomain.com", and / or "mydomain.com", to "ghs.google.com".
Unfortunately, not all DNS hosts support "CNAME" referrals to both the domain alias ("www.mydomain.com"), and the primary domain ("mydomain.com").

Most DNS hosts will support CNAME referral for "www.mydomain.com". Less will support CNAME referral for "mydomain.com", and there's a problem. Some people will try other solutions, like Domain or URL Forwarding.

Some DNS hosts, like GoDaddy, will substitute a 301 Redirect for the primary domain, pointing it to the "www"alias.
  • Sign into GoDaddy - either directly (using a bookmark) - or through the Google Apps "Advanced DNS Settings".
  • Go to "Domains >> Details" for your domain.
    • Click on "Total DNS".
    • Under "CNAMES (Aliases)", add an entry for "www", pointing to "ghs.google.com".
    • Click OK.
  • Go back to "Domains >> Details" for your domain.
    • Click on "Forwarding".
    • Click "Enabled".
    • For "Forward To:" enter the URL of your "www" alias, for instance "www.mydomain.com".
    • For "Redirect Type:" select "301 Moved Permanently".
    • Click OK.


Having equated "mydomain.com" to "www.mydomain.com" at the DNS server, you should be able to equate it in Blogger also. Use the "Advanced Settings" wizard, and select "Redirect mydomain.com to www.mydomain.com.". If you wish to refer to "mydomain.com" as "www.mydomain.com", with your Blogger blog published as "www.mydomain.com" using the "Advanced Settings" wizard, you will need to do both.

A "301 Moved Permanently" redirect is an effective way of equating the primary domain to the "www" alias, in many domains. Setup properly, it is even acceptable to the search engines.

But it has to be setup properly, and at the DNS server. Setup improperly, it will only contribute to problems with your blog, and its existence as a custom domain. Some DNS hosts will not support a "301 Moved Permanently" at the server level; if that's what you face, you will have to use a "CNAME", or find another DNS host.

A 301 Redirect setup in the browser code, and run in the readers browser, will cause problems with the search engines, and with many browsers. A client side meta refresh, or JavaScript redirect, will make the search engines believe that your blog is setup as a doorway page. Some browsers may detect this as a browser hijack. Neither possibility will help you, or your readers, in the long run.

>> Top

Comments

unish said…
i have a domain called trainmesalem.com which is registered to Godaddy. when i put http://www.trainmesalem.com my blog shows up but when i put http://trainmesalem.com it shows parked page of Godaddy. I want have to my blog show up when both types of url is given. So does your tip do that?
Chuck said…
Unish,

If "trainmesalem.com" is directed to the GoDaddy parked server, using the "301 Redirect" is probably the best way to get it to equate to "www.trainmesalem.com". Try it and see.
ChristianZ said…
This information actually helped me. Thanks.
Sai Sundar said…
thank you for this post.
www.snsundar.com
You have been helping me since the day I purchased my domain name both here and on google forums.

On godaddy I have forwarded domain.com to www.domain.com (permanent 301)

and it works perfect. but when i check my site using tools like this:
http://www.seoconsultants.com/tools/check-server-headers-tool/#Report

They tell me that i am using a 302 temporary redirect and not 301. but i want 301 redirection please help me.

Popular posts from this blog

Custom Domain Migration - Managing The Traffic

Your blog depends upon traffic for its success.

Anything that affects the traffic to your blog, such as any change in the URL, affects the success of your blog. Publishing the blog to a custom domain, like renaming the blog, will affect traffic to your blog. The effects of the change will vary from blog to blog, because of the different traffic to every different blog.Followers. People who find your blog because of recommendations by other people.Search engines. Robotic processes which methodically surf your blog, and provide dynamic indexing to people who search for information.Subscribers. People who read your content from their newsfeed reader, such as the dashboard Reading List.Viewers. People who read your content from their browser.No two blogs are the same - and no two blogs will have the same combinations of traffic sources.

Stats Components Are Significant, In Their Own Context

One popular Stats related accessory, which displays pageview information to the public, is the "Popular Posts" gadget.

Popular Posts identifies from 1 to 10 of the most popular posts in the blog, by comparing Stats pageview counts. Optional parts of the display of each post are a snippet of text, and an ever popular thumbnail photo.

Like many Stats features, blog owners have found imaginative uses for "Popular Posts" - and overlook the limitations of the gadget. Both the dynamic nature of Stats, and the timing of the various pageview count recalculations, create confusion, when Popular Posts is examined.