Thursday, January 17, 2019

Blogger as a Subdomain

I wanted to set up a technology blog connected to my website so users don’t have to leave to access it.  Having a blog connected to my website would also help with search engine optimization.

One way to do this is to host the blog on my server in a sub-directory such as:

bradsmithcpa.com/tech

There are several software programs available for this purpose, such as WordPress. I installed and tested several different blogging platforms. Each platform was quite capable, but each had one or more shortcomings. I had experience with Google’s Blogging platform, but didn’t want user’s to leave my website. However I learned I can achieve what I wanted by using a subdomain with Blogger.

Subdomains appear before a domain name separated by a dot. The most common subdomain is “www”. I envisioned a blog with “tech” as the subdomain, so the URL would be

tech.bradsmithcpa.com

It is possible to use Blogger with a subdomain.  This article shows the required steps to achieve this.

Step 1: Create new blog


Go to blogger.com, click New Blog.

Create new blog on Blogger
Create new blog

Step 2: Give your blog a title and address


Fill in title and address then click "Create blog!".  The address isn't important at this step because you will add a redirect to your website and subdomain later.

Give your blog a title and address
Give your blog a title and address

Step 3: Skip adding a google domain


Google gives you the option to create a new domain.  Click "No Thanks" to skip this step.
Skip adding a google domain
Skip adding a google domain

Step 4: Click Settings


After Google creates your blog, you will be directed to the Blogger administration page for the site you just created.  Click settings before adding content.

Blogger> - Click Settings
Click Settings

Step 5: Click +add third party URL for your blog


Select Basic, and under Publishing Click +add third party URL for your blog

Blogger>Settings>Basic:Publishing:Blog Address - Click "+add third party url for your blog
Click +add third party URL for your blog

Step 6: Add your desired web address


Under third party domain settings, add your desired web address.  It should be follow the pattern: subdomain.domain as shown in the image below, then click save. This will be the URL for your new blog once all the steps have been completed.

Blogger>Settings>Basic:Publishing:Blog Address - Add your personal web address
Add your desired web address

Step 7: Return to the editing screen


Blogger will provide additional setup instructions by clicking edit next to the web address you just created.

Blogger>Settings>Basic:Publishing:Blog Address -  Return to the editing screen
Return to the editing screen

Step 8: Add CNAMEs to your domain's DNS settings


This is the step where you are instructed to setup two CNAMEs on your website.  The CNAMEs are needed to point your website to Blogger. The next steps provide guidance on how to do that.

Please note it may take a few minutes for Google to display the CNAME instructions shown below.  If it doesn't appear immediately go back to the page shown on Step 7 and repeat until the CNAME instructions are displayed.

Google support explains "A Canonical Name or CNAME record is a type of DNS record that maps an alias name to a true or canonical domain name. CNAME records are typically used to map a subdomain such as www or mail to the domain hosting that subdomain’s content. For example, a CNAME record can map the web address www.example.com to the actual web site for the domain example.com."  For more information click the link below:


Blogger>Settings>Basic:Publishing:Blog Address - Add CNAMES to your domain's DNS settings
Add CNAMEs to your domain's DNS settings


The following show how to create CNAMEs with cPanel, but the steps would be similar for other website hosting platforms.

Step 9: Go to cPanel and click Zone Editor


Log in to your website's administration page.  My website uses cPanel as the administration front-end.  Once there, click Zone Editor under the Domains section.

Go to cPanel and click Zone Editor
Go to cPanel and click Zone Editor

Step 10: Click Manage for the desired domain


At the Zone Editor screen click manage next to the domain used for the blogger account.

Click Manage for the desired domain

Step 11: Click the drop-down arrow for + Add Record and select Add CNAME Record


At the Zone Records page for the selected domain, click +Add Record.  On cPanel you can specify the type of record by clicking the +Add Record button's down arrow and choosing CNAME as shown.

On Cpanel>Zone Editor, click 'add record'
Click +Add Record on Zone Records screen

Step 12: Complete Name, TTL,  Type, and Record for the CNAME you want to add


Add the first CNAME specified in Step 8 a follows:
  • In the Name field enter the desired subdomain. I used Tech in my example.  If you're using a platform other than cPanel the fields may be labeled as Label, or Host. Then,
  • tab to TTL and enter 3600,
  • tab to Type and enter CNAME,
  • tab to Record and enter ghs.google.com. If you're using a platform other than cPanel the fields may be labeled as Destination, Target, or Points To. Then,
  • click Add Record
Blogger requires an additional CNAME for security purposes.  Add the second CNAME specified in Step 8 as follows:
  • In the Name field enter the second name.  My example starts with sol7.  If you're using a platform other than cPanel the fields may be labeled as Label, or Host. Then,
  • tab to TTL and enter 3600,
  • tab to Type and enter CNAME,
  • tab to Record and enter the second URL. My example starts with gv-z and ends with googlehosted.com. If you're using a platform other than cPanel the fields may be labeled as Destination, Target, or Points To. Then,
  • click Add Record

cPanel>Zone Editor>Zone Records - Complete fields to add a new CNAME Record
Complete fields to add CNAME

If all the steps were performed correctly your new blog should appear at you desired web address (shown in step 7).  Please note that it may take 15 minutes to 24 hours for the changes to CNAME to populate to the Internet's domain name servers, so initially the web site may not display.  Give it time.  If it doesn't work after a while double check your CNAME records as follows:
  • Make sure the type is CNAME
  • Double check the name and URL fields
  • Make sure you created two CNAME records