Speed Up Your Site With a CDN

I have been, or can be if you click on a link and make a purchase, compensated via a cash payment, gift, or something else of value for writing this post. Regardless, I only recommend products or services I use personally and believe will be good for my readers.

Adding a Content Delivery Network (CDN) to host your static files can really speed things up, and it’s super easy!

I’m using MaxCDN – they’re offering 1TB for FREE (usually $39.95, or save 25% and pay only $29.96 with this MaxCDN coupon).

First step: signup with MaxCDN. Even if you’re not going to use this right away, get your free 1TB (expires Aug-31).

Once you have your account, you need to create a Pull Zone. Pull Zones are brilliant:

[quote]This Zone is for your every-day support files. A Pull Zone will automatically pull the data from a location that you specify upon the first request for the file. The files are served to the end user from either a subdomain of netdna-cdn.com or a custom domain (sub domain) of your choice that points to the CDN. The data is automatically purged from the server after an customizable amount of time.[/quote]
MaxCDN Create Pull Zone
MaxCDN Create Pull Zone
[list icon=”sign-in”]
  • Pull Zone Name – Enter a zone name of at least 3 characters in length using letters and numbers, no special characters or spaces.
  • Origin Server URL – Enter the complete directory path to your data on your origin server (including http://…). The origin server must be running on port 80. Your bucket will be populated automatically from your origin server as files are requested.
  • Custom CDN Domain – This is the domain name that will redirect to our CDN server. You will point all the content that you want pulled from the CDN to this location (Example: netdna.mydomain.com)
  • Label – Enter something that describes this zone
  • Compression – Enable GZip compression on text, html, js, css or xml files
[/list]

Click the Create button. Go to Manage Zones, and look at your Pull Zones. Click on the one you just created.

You’ll see it has a Temporary URL of something like ericnagel.ericnagelandasso.netdna-cdn.com. If you want to, edit your domain’s zone file and add a CNAME (Alias). In GoDaddy, it looks like this:

Adding a CNAME DNS Entry with GoDaddy
Adding a CNAME DNS Entry with GoDaddy

When you ask for a file from the CDN, the system will look to see if it has that file and, if so, serve it to you from the closest location possible. If not, it’ll grab the file, then give it to you and store it for future requests. Request files via:
ericnagel.ericnagelandasso.netdna-cdn.com/ wp-content/ uploads/ 2012/ 08/ getmonkeyfinger.gif (nospaces)

or, if you set-up the CNAME,
static.ericnagel.com/wp-content/uploads/2012/08/getmonkeyfinger.gif

You don’t have to upload anything – when a user requests a file, the CDN will pull the file from your server, and hold a copy of it for you.

So how do you get your WordPress blog to point references for images, css and JavaScript to the CDN, instead of the local copy of the data? Use CDN Linker!

[quote]I tried using W3 Total Cache but, yet again, it screwed up my site. For some reason I can never get that plugin working. Probably due to the security of my server / site being locked down so much[/quote]
WordPress CDN linker lite
Setting up WordPress CDN linker lite

When you first load your site, things will be a bit slower as the CDN gathers the static content. But subsequent requests are handled by the CDN, and things will really speed up. Remember: site speed is an on-site SEO factor to consider.

MaxCDN Content Delivery NetworkYou don’t have to be using WordPress to use a CDN! I’m using MaxCDN for the app side of Monkey Finger and it’s wonderful, and was easy to implement. I’m also using it for my online backups website, which is mostly static pages. If you have a non-WordPress site, just do a find/replace to get your images, css and js hosted with the CDN.

Comments
  • Sol Orwell
    Posted August 31, 2012 9:51 pm 0Likes

    Any reason to choose MaxCDN over Amazon’s Cloudfront or Akamai?

    • Eric Nagel
      Posted September 4, 2012 11:27 am 0Likes

      It’s easy. They do a good job marketing the fact that they’re giving away free space.

      S3 is a storage mechanism – not a CDN. A CDN will deliver your content from the closest server. With S3, you specify the server location.

  • Sol Orwell
    Posted September 4, 2012 11:29 am 0Likes

    Amazon’s CloudFront is a CDN: http://aws.amazon.com/cloudfront/

    I’d just imagine that either Amazon or Rackspace would be more reliable (especially as Rackspace uses Akamai), and they seem to be cheaper.

    • Eric Nagel
      Posted September 4, 2012 11:32 am 0Likes

      You’re right – and go ahead. The idea behind this is to use a CDN. And the post explains what a CDN is, what a Pull Zone is, how to set your CNAME, and what WordPress plugin to use.

      There are other CDNs, other Plugins, other blogging platforms, but the idea is the same: use a CDN to make your site faster.

      • Sol Orwell
        Posted September 4, 2012 11:36 am 0Likes

        Oh yeah, I totally appreciate it. I had never thought to do a CDN, and your post got me researching, which showed me how cheap this stuff has gotten.

        Was just wondering if any reason to use those guys. I am using Rackspace’s now, and their uploading system is absolutely shit.

        Thanks!

  • Paul Carlson
    Posted September 6, 2012 4:41 pm 0Likes

    Crum. I missed the discount because I just saw the post today. D’oh!

    That’s what I get for not reading this blog daily! 🙂

    • Paul Carlson
      Posted September 6, 2012 4:42 pm 0Likes

      Er, not the discount. The Free 1TB…

  • Thomas
    Posted September 12, 2012 10:23 am 0Likes

    I miss the free 1TB too. Is there any way to get it now?

    • Eric Nagel
      Posted September 12, 2012 1:42 pm 0Likes

      Not unless they run it again, but I wouldn’t wait. I paid for my 1TB before the free offer came out.

  • Thomas
    Posted September 12, 2012 6:53 pm 0Likes

    I guess I will have to pay it then. Thanks Eric!

Leave A Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.