If you’re just wanting to get started with CPA Affiliate Marketing, it may seem overwhelming just to get your first campaigns going on a tight budget due to the number of subscription services you need to sign up for (tracker, spy tool, website hosting, etc.).

This year I want to show people how to get started promoting CPA offers with the cheapest essential services, so you can use the rest of your starting budget to buy traffic and learn affiliate marketing as fast as possible.

After signing up for a free tracker, you’re going to want to set up hosting for the landing pages that you will use in your campaign. There are literally hundreds of different hosting providers, which vary by cost, speed, etc.

Today I’m going to show you how to set up CPA affiliate landing pages using Amazon’s S3 static website hosting, and CloudFront (Amazon’s CDN network) to host lightning fast landers.

Why Amazon S3 + CloudFront?

With hundreds of hosting options available, why is Amazon S3 and CloudFront the best option for hosting your first landing pages?

Amazon’s services are extremely cheap, and you only pay for what you use. You can view the pricing for all their services here.

Apart from being really cheap, they offer a FREE pricing tier for one year after you open your account. This can immediately help with your cash flow by allowing you more money each month from your budget to spend on campaigns.

Who doesn’t like free?

The other reason Amazon is a good choice for hosting your landing pages is speed. The speed of your landing pages is critical for CPA marketing. If you have slow pages you’ll struggle to get a good ROI.

Amazon has data centers around the world, making your landing pages load fast no matter what country your visitors are from.

They load quite fast with just the S3 service, but if we couple it with their CDN network (CloudFront) then they can be as much as 70% faster.

Ready to use Amazon S3 and CloudFront for your website hosting? Let’s go!

How To Set Up Amazon S3 + CloudFront


  • AWS Account
  • Namecheap Account (or another domain registrar account)
  • A domain name

In order to follow this guide completely, you are going to want to have an AWS account, a domain, and a Namecheap account. If you don’t have a Namecheap account you can still follow the guide, but you will have to figure out the Namecheap steps on your own at your domain registrar.

Step 1: Forward Namecheap Emails

Note: You can skip this step if your namecheap account is with an email you have access to.

Because we are going to make the website secured by SSL (HTTPS), we need to take a few steps in Namecheap before we apply for the free SSL certificate from Amazon.

  1. Login to your Namecheap account.
  2. Find the domain you’d like to forward emails from. Click ‘Manage’.
  3. On the ‘Domain’ tab (should be the default tab after step 2), scroll down to the ‘Redirect Email’ section.
  4. Click ‘ADD CATCH-ALL’ and in the ‘Forward to’ box type your email address.

NOTE: You may need to wait up to 60 minutes for the settings to work before continuing with step 2. You can test if it works by sending an email to your domain (i.e. admin@example.com).

Step 2: Generate Free SSL Certificate

  1. Go to the ACM Dashboard and click “Request a Certificate”. Then, pick the public certificate (usually the default option).
  2. Enter your custom domain name and your domain name prepended with *..(i.e. *.example.comand example.com.)
  3. Select “Email validation”.
  4. Check your email and click on the approval link. Then click “I Approve” on the approval screen you’ll be shown. If you don’t get both emails within a minute or 2 you can resend it from your Amazon dashboard.
  5. If you return to the ACM Dashboard, you should see that your certificate has been issued after a few seconds.

Note: You must wait for your certificate to be “issued” before doing the following steps. If you don’t you may run into issues when trying to connect the certificate to CloudFront.

Step 3: Configure S3 Bucket for Static Site

  1. Go to the S3 Dashboard and click “Create Bucket”.
  2. Enter the name of the bucket. Use the domain name, but DO NOT use . in the bucket name. Use - instead.
  3. It’s recommended to use N. Virginia for your server region so your SSL will work correctly.
  4. Click “Create”.

See example below with example.com.

Step 4: Fix Bucket Permissions

  1. Select the bucket you just created in the S3 dashboard.
  2. Click on the “Permissions” tab.

3. On the “Public Access Settings” page, click “Edit”.

4. Uncheck both boxes under “Manage public bucket polices for this bucket”. Click “Save”. 

5. On the same “Permissions” tab from the previous step(s), navigate to the “Bucket Policy”. Paste the code below. Edit the “Resource” key with the name of your bucket (example-com).

{ "Version": "2012-10-17", "Statement": [ { "Sid": "AddPerm", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::example-com/*" } ] }

Step 5: Enable Static Website Hosting

  1. Select the bucket in the S3 dashboard.
  2. Go to the “Properties” tab.
  3. Select “Static website hosting”. (it will be “Disabled” when you visit this screen)

4. Select the radio button “Use this bucket to host a website”. In both the index and error document fields, enter index.html. Click “Save”. (make note of the “endpoint” on this step.)

Step 6: Enable CloudFront Distribution

  1. Go to the CloudFront Dashboard and click “Create Distribution”.
  2. Under the “Web” distribution method, click “Get Started”.
  3. In the “Origin Domain Name” box, paste your S3 URL. Don’t select the dropdown that may auto populate, as it may cause issues. The “Origin ID” should auto populate.
  4. In the “Default Cache Behavior Settings,” select Redirect HTTP to HTTPS. Leave the rest of the settings under “Default Cache Behavior Settings” alone except for “Compress Objects Automatically” should be set to “Yes”.

5. In the next section titled “Distribution Settings,” you need to enter your custom domain name. Enter both example.comand *.example.com. These should be the same domain names you already requested SSL certificates for.
6. For SSL Certificate type choose “Custom SSL Certificate”; a text box should appear. If for some reason you can’t select “Custom SSL Certificate”, then you must click the “Request or Import a Certificate with ACM” and request another like we did before. Sometimes your certificate isn’t issued from the right region for some reason.
7. Select your SSL Certificate in the text box.

8. Scroll to the bottom of the page and click “Create Distribution”.
9. Make note of your “Domain Name” when returned to the CloudFront dashboard.

Step 7: CNAME from Namecheap to CloudFront

  1. Login to your Namecheap account.
  2. Find the domain you are going to use with CloudFront. Click ‘Manage’.
  3. Go to the “Advanced DNS” tab and find the “Host Records” section.
  4. Click “Add New Record”, select “CNAME”. In “Host” type @ and for the “Target” paste your CloudFront URL/Domain Name. (Note: some people have had issues using “@” for the host like I do, so try “www” if it doesn’t work.)

5. Click the green check mark.
6. Wait 60 minutes (probably less).

Step 8: Upload Landing Pages

Now you’ve created your ‘server’ and configured it to work with a CDN. You just need to upload your landing pages to your S3 bucket.

If you don’t have landing pages to upload, I recommend checking out PureLander landing page builder to quickly make pages for CPA affiliate marketing.

  1. Go to the S3 dashboard.
  2. Upload your files. You can use folders to keep everything organized.
  3. Once you upload a landing page you can view it by typing your domain name followed by the folder structure of you organized it in. For example… example.com/lander1/index.html

If you have any questions about this guide, please feel free to leave a comment below and I’ll answer it as soon as I can.

    40 replies to "Setup Amazon S3 + CloudFront to Host CPA Affiliate Landing Pages That Are Lightning Fast"

    • Lee

      I followed all the instructions and everything is good until step 6.7, it just won’t let me select “Custom SSL Certificate”. Why?

      • nick

        In Step 2 did your certificate get ‘issued’?

        If you did the next few steps really fast the only thing I could think of is that the Amazon systems didn’t update that you have a valid certificate fast enough. Maybe wait 20 min or so and try again? If that doesn’t work, I’d try logging out and logging back in. If it still won’t work then try clearing your cookies or even try a different browser.

        Finally, if none of that works then you can try contacting Amazon support. I’ve never ran into that issue. They shouldn’t charge you for support because it’s an issue with their interface.

        • Lee

          Yes, it did get issued, however, the differences is the “in use” is shown as “no”, and the “Renewal eligibility” is shown as “Ineligible”. I am on the free basic plan, so I don’t get the chance to send the support a ticket, I guess…sigh.

          • nick

            I don’t think the ‘in use’ and ‘ineligible’ should matter. Are the CNAMES you’re trying to use the same as what’s in the SSL certificate?

            Regarding the support, I believe you can still ask for help. I’ve had to send them a few tickets and was on a free plan and they didn’t charge me.

            • Lee

              It’s working now. I deleted the previously created bucket and recreate another one and was able to create the distribution with no problem. Thanks for your help man, cheers!

            • nick

              @Lee Glad you got it all sorted out and thanks for coming back to post the solution in case anyone else has that issue in the future.

    • Kyle E Wood

      I am having the same problem listed above. I have already gone back and deleted the bucket and went through the whole process again. When I put in my domain names it does not let me choose custom SSL.

      • nick

        Hey Kyle,

        I’m not sure what causes that issue. I’ve never ran into it when following the steps above.


    • donnell

      when I put my domain name into the resource tab and click save it gives me the error “unknown field example-com” . And yes I replaced my domain name with “example” in “example.com”. I have tried re-writing the code by hand but can’t fin any troubleshooting ideas online

      • donnell

        Oh and this is in step 3.5 by the way

        • nick

          I think you’re on the bucket policy step? If that the case then you replace just “example-com” with whatever you called your bucket in the step above.

          So that line would then look like:

          “Resource”: “arn:aws:s3:::yourbucketname-com/*”

    • Konstantin

      Thank you so much!

    • Konstantin

      For everyone having an issue with SSL Certificate on step 6.6 – be sure when you were on step 2 this option was set to N.Virginia!

      screenshot: https://i.ibb.co/xzcWtf6/SSL-cert.jpg

      If you have an issue on step 6.6 (SSL Certificate is grayed out) – issue a new SSL certificate with N.Virginia set on the issuing screen, as shown on a screenshot.

      • nick

        This is 100% correct. I was setting up several new buckets last week and ran into the issue where I couldn’t find my SSL certificate I created. The issue is cased by Amazon sometimes issuing the certificate from a different region than N. Virginia. The only region that will work is N. Virginia.

        On step 6.6 you can actually use the button “Request or Import a Certificate with ACM” and issue a new certificate and it will usually force the certificate to be issued from N. Virginia.

        I added this note into step 6.6 if anyone has this issue moving forward.

    • deema

      Hi Nick,

      You have more than AMAZING BLOG,

      I want just to understand if my domain is now secure, is the ssl active



      Also not sure why when I upload the landing page to S3, the page photos disappear as you see in the link, despite it opens when i open index.html on my desktop, any advise?

      • nick

        Hey Deema,


        I’m not sure if your domain is secure, as there isn’t any content on it. If I load it in my browser I just get the namecheap page that says it’s registered.

        The screenshot is secure, but it seems that you’re not using your custom domain there. Instead, the Amazon url is being used. The page should load on your domain and if you see the lock in the address bar it’s secure.

        Regarding the photos disappearing, it could be a couple of problems:
        1. You aren’t uploading the photos to s3.
        2. The links to the photos aren’t correct. You may want “photo.jpg”, but your src might actually be like “…/photo.jpg”, which would work on your desktop, but not once it’s uploaded.

    • amal

      @nick many thanks for your support,

      how I can resolve this my domain to cover the Amazon domain?

      • nick

        You need to complete steps 6 and 7 of this guide.

    • Journey66

      One) I ran into the same problem with the Custom SSL Certificate option radio button not be available (step 6.7).

      Below it is the “Request or Import a Certificate with ACM” button.

      I clicked on this and followed the previous steps again in creating an SSL cert, approved it via email, and then the new cert was available in the Custom SSL Certificate option. Easy fix!

      Two) In setting the CNAME record in NameCheap (8.4) I typed in for Host “@blahblah.cloudfront.net”…which it didn’t like.


      Corrected it to: Host @ Target blahblah.cloudfront.net

      Worked perfectly after that.

      Tremendous blog, @Nick!

      • nick

        Yes. Come to find out sometimes Amazon will issue your certificate from an incompatible region. Your certificate needs to be issued from N. Virginia in order for you to use it with Cloudfront. Using the “Request or Import a Certificate with ACM” button will force this to happen.

    • Ajibola

      Can i host landers fro pure landers on my wordpress website?

      • nick

        You could, but you’d need a special plugin to upload HTML files, or just upload them to the root directory of your server. I personally wouldn’t do either.

        Amazon is free for a year unless you buy huge amounts of traffic. Then, it’s super cheap. Like a few bucks a month.

    • Ryan

      Hi Nick,

      Thank you for your guide.

      I had originally followed vortex’s guide from the STM forum. It’s more or less the same guide as yours except for a few extra steps and I’m curious why your guide has them listed.

      In step 3.2 you say to use a “-” instead of a “.” in the domain name. Why is this? The guide in STM doesn’t say to do this and hosting works fine.

      The other step was Step 5: Enable Static Website Hosting. This isn’t in the STM guide either and again static hosting works fine without doing this step.

      One would think you’d need to enable static website hosting for it to work but hosting works fine with this setting disabled. I never knew this setting was even there until I read your guide.

      Your guide also says in step 5.4 “make note of the “endpoint” on this step” with the endpoint URL highlighted in your screenshot stating to save it for later. Where at in your guide did you use this URL? It’s the cloudfront URL that is used for the CNAME in your DNS.

      What are your thoughts?

      • nick

        Hey Ryan,

        When I was first trying to do this the first time I didn’t find any guides online, so I had to figure out all the steps on my own. This is what I came up with and the exact step by step guide I follow when I’m setting up my own bucket when I need a new one.

        In regards to 3.2… I found it mentioned a few times that this can potentially cause issues (these issues could be resolved by now though), so I don’t use a .

        Step 5 was what I thought was needed when I was researching how to do this. I still do it on all my buckets.

        For step 5.4 you paste that URL in step 6. See screenshot (red text).

        Thanks for the comment.


    • Eric

      Hi Nick …

      btw, I also get problem in in customize SSL Certificate, and I able to fix it after create the new one.

      thanks 4 your tutorial …

    • Saikat Mitra

      Hi Nick,
      Is it possible to host my website with only the domain name with the same content?? (not using /lp2/index.html) I want to host my website only with my domain & sub-domain names.

      • nick

        Yes. I replied to your email 🙂


    • manoj kohli

      sir i have a hosting account already for unlimited domain and hosting bluehost can i use this how i upload a landing page or sir i want know i have pure lander membership as per your guidance in compaign page i will insert my landing page url and in tracking what url i will

    • ismael

      Hey Nick,
      I followed all steps and i got this path for my URL :
      How can I change it to :
      If it’s possible.

      • nick

        Hey Ismael,

        Of course, you can use a custom domain with Amazon hosting. It sounds like you didn’t complete the guide fully, particularly step 6 and beyond. Cloudfront (Amazon’s CDN) is where you add the custom domain so you don’t have to use the ugly s3 URL.

        I hope that helps.


    • Juan

      Hey Nick,

      One quick question: can I set up my Pay Per Call business from a country that is not the US? I am in Nicaragua. Is everything available for internationals, like the networks allowances, tools subscription, etc?


      • nick

        Hey Juan,

        I’m really not sure what requirements various tools and affiliate networks have in regards to what country you’re from. I imagine they’d be a bit suspicious if you’re coming from Nicaragua, but you could easily clear any doubts with reliable and verifiable references (most affiliate networks will want one in pay per call).


    • Will

      Hi Nick,

      Thanks for the guide. Everything worked for me except one part. For step 6.5, when I tried to add the *.example.com, it wouldn’t let me create the distribution. I put it on a new line and replaced example with my domain name. It gave me an error citing one of the alternative URLs. Do you know why that is?

      I ended up creating the distribution without the second alternative domain, with only “example.com”, and it still works but I wanted to see if you had any insight.


      • nick

        Unfortunately, I’m not sure what the issue is. If I follow these exact steps everything works fine for me.

    • Mhaye

      Hi, Nick
      Just a quick question
      As I work my way through stage 4, I’m getting message.
      “We highly recommend that you never grant any kind of public access to your S3 bucket.”
      I guess that’s normal right?

      • nick


        That’s totally normal.


    • Brian

      Hi Nick,

      Now that bunnycdn storage have simplified solution for this. They even support sub folder without needed to key in index.html

      Will show your landing page if there are index.html inside.

    • william moore

      Great post Nick, have you had any issues using Namecheap for DNS routing instead of AWS Route 53?

      • nick

        I have not had any issues. Not sure what kind of an issue you might have…

Leave a Reply

Your email address will not be published.