Currently Browsing

Use CNAME and DNS To Avoid Future Headaches

Use CNAME and DNS To Avoid Future HeadachesEverybody is familiar with sub-domains. A good example would be the domain http://example.kremer.com.  The “example” is a totally different Web site address than http://kremer.com.  The little known fact is that you can use a DNS tool called CNAME to point a sub-domain at any server that is set up to accept your incoming CNAME.

Use CNAME for CDN image and video hosting

Back in 2006 when I was with ChaCha I was in charge of setting up our account with our CDN (Content Delivery Network).  We had chosen Akamai, one of the largest CDN providers in the world.  We expected that we were going to get a lot of traffic to our Web servers so it made sense to use Akamai to host our images and videos.  Their servers were placed on the “edge” of the Internet so they called their hosting service “EdgeSuite”.  After they set up our account they told us that all of our images and videos would be hosted on the server: http://chacha.edgesuite.net. So that meant that all of our images would be coded into our web pages with a full URL like: http://chacha.edgesuite.net/images/example.jpg

This meant we would have thousands of Web pages with the hard coded URL that pointed to an Akamai owned domain. But….Akamai offered that we could set up a DNS record that pointed a sub-domain to their server.  I created the CNAME record: akhost.chacha.com and pointed the CNAME record to chacha.edgesuite.net.  So then we coded all of our Web page images as: http://akhost.chacha.com/images/example.jpg.

Flash forward in time, four years later.  It’s now 2010 and ChaCha is receiving over a million visits a day. Our contract with Akamai is coming to an end.  The decision was made to change our CDN from Akamai to Amazon S3 (Amazon Simple Storage Service) also know as “The Amazon Cloud”.  The transition is smooth because I thought ahead and set up a CNAME.  If I had not set up the CNAME, we would have had to go through a complete re-code all of the pages that contained the Akamai domain “edgesuite.net”.  Because we had CNAME’ed the images all we had to do was transfer all of the images to the Amazon S3 account, then change the CNAME DNS record to point to the Amazon domain instead of the Akamai domain.  The whole process took an hour, re-coding the pages could have taken a week or more.

Use CNAME to keep your SEO “Google Juice”

Another use would be if you are partnering with another Web site to provide a web page based service.  An example was with a company I worked with who had partnered with a Career/Job site to manage the company’s job listings.  Just like Akamai this company had set up a special web page with the domain:  examplecompany.Jobsite.com for Example to use.  I instead set up a CNAME DNS record that pointed: jobs.examplecompany.com to the partner hosted page at examplecompany.Jobsite.com

The advantage of the CNAME was two fold.  First, like the CDN example, if in the future Example wanted to change their Career/Jobs partner they wouldn’t have to re-code their pages.  But secondly, and more importantly, by linking to an outside domain like Jobsite.com they could lose some SEO power.  You’ve learned with SEO you want to do as much internal linking as possible. By linking to examplecompany.Jobsite.com you may lose some SEO power (juice).  Plus if an external site links to that URL you don’t get the power of that incoming link.  By setting up a CNAME on your domain, jobs.examplecompany.com, you get all the SEO power.

So when you are picking a partner for CDN, Jobs, or any outside company that will host your content on their server…avoid the headaches…..take one CNAME and call me in the morning!

Tags: , , ,

You might also find these posts interesting

  • No Related Post

Recent blog posts

2 Responses to “Use CNAME and DNS To Avoid Future Headaches”


  1. Brandon Corbin
    January 6, 2011

    Great post Steve, I would be interested in hearing the cost vs speed difference between Akamai and S3. Was there a huge difference?



  2. Steve Kremer
    January 6, 2011

    I have to qualify all of my comments with the fact that I did the original deal with Akamai, but was only marginally involved in the deal with S3. Also, this all happened in 2009, so my information may be dated.

    Akamai is a great company. Their service was over all fast and 100% uptime. Their online documentation was then, and to this day, the BEST online tech documentation I have ever come across. Their tech support also was the great as well. The main difference was their cost structure. With Akamai there was a minimum monthly charge, plus a per MB charge. With S3 the cost is all based on per MB. So cost played a factor. Plus, with Akamai they were all based on file storage. It was GIF, JPEG, PDF or HTML. With Amazon services beyond S3 you can do application hosting, Brandon please correct me if I am wrong on this.