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

bushan 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?
Nitecruzr 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.
Unknown said…
thank you for this post.
www.snsundar.com
Shurik said…
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

What's The URL Of My Blog?

We see the plea for help, periodicallyI need the URL of my blog, so I can give it to my friends. Help!Who's buried in Grant's Tomb, after all?No Chuck, be polite.OK, OK. The title of this blog is "The Real Blogger Status", and the title of this post is "What's The URL Of My Blog?".

Leave Comments Here

Like any blogger, I appreciate polite comments, when they are relevant to the blog, and posted to the relevant article in the right blog. If you want to ask me a question thats relevant to blogging, but you can't find the right post to start with (I haven't written about everything blogger related, yet, nor the way things are going I don't expect to either), ask your questions here, or leave an entry in my guestbook.

As noted above, please note my commenting policy. If you post a comment to this post, I will probably treat it as a "Contact Me" post. If you have an issue that's relevant to any technical issue in the blog, please leave a comment on the specific post, not here. This post is for general comments, and for non posted contact to me.

If the form below does not work for you, check your third party cookies setting!

For actual technical issues, note that peer support in Blogger Help Forum: Something Is Broken, or Nitecruzr Dot Net - Blogging is, almos…

What Is "ghs.google.com" vs. "ghs.googlehosted.com"?

With Google Domains registered custom domains becoming more normal, we are seeing one odd attention to detail, expressed as confusion in Blogger Help Forum: Learn More About Blogger.My website uses "ghs.google.com" - am I supposed to use "ghs.googlehosted.com", instead?It's good to be attentive to detail, particularly with custom domain publishing. This is one detail that may not require immediate attention, however.