If you are running a website with fairly high traffic, one of the things that you will want to do is to migrate your images/videos out of your server and serve them from a Content Delivery Network (CDN). The greatest benefit of a CDN is that it can serve your web content from the location closest to your reader, and thus speed up the loading of your site, reduce your server bandwidth usage and of course rank well in the search engine.

  1. Login to your AWS Management Console.

  2. Click the CloudFront tab.

  3. Click the “Create Distribution” button.

In the CNAME field, enter a sub-domain that you want to use to serve your content.(Note: Do not put “http://” infront of your sub-domain).

The logging option is optional. If you set it to ON, it will log all the events and details onto a log file. You will have to specify a bucket for it to store the log file.

Make sure the distribution status is set to “Enable”. Click “Continue”.

  1. Lastly, review your settings. If everything is correctly, click “Create Distribution”.

Configuring your CNAME

Still in the AWS Management Console, copy your CloudFront domain name for this particular distribution.

Contact your webhost and get them to create a CNAME record to point the sub-domain you have entered previously to this CloudFront domain name.

That’s it. As long as you use this sub-domain in your website, all your static files will be served from the location closest to your readers.

Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.

Our latest tutorials delivered straight to your inbox