December 28, 2016

setting up a subdomain for blogger

Creating a subdomain redirect for blogger is slightly different from doing the same for Google Sites. This post is specific to eNom since I had so many problems figuring this out. First here's the deal. I have a domain name: www.MyDomain.com. But I created several Blogger blogs and I want to create subdomains for them. For example, I wanted:
  • www.blog1.MyDomain.com
  • www.blog2.MyDomain.com
  • www.blog3.MyDomain.com
But I also wanted the naked subdomains to point to the same blogs. For example if someone typed in "blog1.MyDomain.com", (without the www), it should still go to "www.blog1.MyDomain.com".

It was easy enough to create the correct subdomain redirect in Blogger using any number of tutorials including Google's own directions, but I had a devil of a time setting up the second address correctly. After tons of searching and trial and error, it turns out that the solution is relatively straightforward-- I actually need to do two things:
  1. set up a custom domain as per the tons of tutorials and then
  2. set up a url redirect. 
So here's how I did it with Blogger and eNom.

 Part 1: set up the Subdomain
Step 1) create a new blog with your desired blog name: e.g blog1; the default url will be "blog1.blogspot.com"
Step 2) log into your DNS manager (usually Enom, GoDaddy, etc.)
Step 3) set up the subdomain in your DNS manager. 
  • For eNom, under Host Records, click Edit

  • Then click Add New

  • in the Host Name put in www.blog1 (or whatever desired name you want-- it does not have to be blog1) 
  • under Address, enter ghs.google.com
  • under Record Type, choose CNAME (Alias)
Step 4) IMPORTANT- wait at least one hour
Step 5) Configure the new URL in Blogger
  • go back to your blog, under Settings -> Basic -> Publishing, click "Setup a 3rd party URL"

  • enter the name you chose in your DNS host-- e.g. www.blog1.MyDomain.com and click Save

Now, when someone enters www.blog1.MyDomain.com, it should go to your blog.

Part 2: set up the URL Redirect to your subdomain
But you may also want to make sure that when someone types the naked subdomain (when he/she leaves out the www), he/she also lands on your blog. For that to work, you have add a URL Redirect in your DNS host.
Step 1: Log into your DNS manager
Step 2: set up the URL redirect
  • again under Host Records, click edit (see image above)
  • again, click Add New (see image above)
  • in Host Name, add the naked domain: blog1
  • under Address, enter the full URL of your subdomain: e.g. www.blog1.MyDomain.com
  • under Record Type, choose URL Redirect
  • click Save
Wait about an hour and you're done! Now, whether someone enters www.blog1.MyDomain.com or just blog1.MyDomain.com, he/she should land in the same place.

Finally, I should point out some quirky things I found as I tried to work this out. One, Firefox automatically adds www to naked urls which meant that even if I didn't set up a URL Redirect (Part 2), I still ended up a the correct address. However, since other browsers do NOT automatically add www, I think it's a good idea to go ahead and complete Part 2.

No comments:

Post a Comment