Affiliate marketing can be a lucrative occupation or side hustle, but if you’ve never built a website before you may not know where to begin. I decided I’d like to walk readers through how I personally create my websites, because I usually find step-by-step guides incredibly helpful when I’m just starting something new. Here’s how to build an affiliate website for less than $20. Yes, there will be some affiliate links in this post (what kind of affiliate marketer would I be if there weren’t?), but I can’t stress enough that this is the actual process I use.

You don’t need to know any code to do this, either. The most daunting tasks include typing some commands in your local Terminal, but I’ll assume you don’t know what that means and make it very easy to follow.

In fact, this is the first post I’m writing for the site you’re one right now, and I’m writing it as I’m creating it, because I want to give you a fully transparent method for how I do things. You can trust the links, because they are the ones I use.

A quick note about me: I am, definitively, not a web developer. I would never market myself as such. I have some comfortability in HTML, less so in PHP. I’m a web analyst by trade, and run a few mediocre affiliate blogs on the side.

How To Build An Affiliate Marketing Website For Less Than $20

Some readers will, certainly, find this process more complicated than it needs to be. It probably is! But it’s actually very easy, and very affordable. Affiliate marketing websites are a great way to make some cash. If you do it affordably, you can make your website costs up quickly and start earning real revenue. So, less than $20… can that be true? Well, yes. Here’s the cost breakdown:

  • Domain name – $9 to buy standard .com website domain
  • Hosting – $10 to fund your account (you can do less, if you want. My average hosting per site per month is $4.31 (median cost is $3.90), inclusive of DNS, Database, and storage

And that’s it! Those are the only costs, and usually I can get the domain for less than $9.

If you’re ready to get started we’ll jump. Things we’ll cover below include:

  • Buying a Web Domain with
  • Setting up hosting with
    • Creating a SQL database
    • Installing WordPress
    • Securing with TLS
  • Installing Themes and Plugins

Ready to build an affiliate marketing website for less than twenty dollars? Let’s begin.

Buying a Web Domain for Your Affiliate Marketing Website

There’s a lot of marketing talk and “strategy” that could be covered here, but I’m getting into all of that in this post. Whether you have a brand in mind or want to just wing it is up to you (I usually just wing it, for better or worse).

I use as my registrar for all of my web domains. I prefer it over GoDaddy. Mostly because they have good customer support and some fun tools to help you build your brand. I also like to keep all my domains registered in one place.

Step 1: Create an account at

This is straightforward. Visit and create a new account. Use an email you have access to and choose a password you can remember. It may be a good idea to use a Password Manager to keep track of things. I use the free, open source BitWarden. Some people prefer LastPass.

If you have a different preferred registrar you’d like to use, that’s fine. Some of the instructions below are tailored to NameCheap, but are not exclusive, so you can still continue with ease.

Step 2: Login to and start searching for domains

Most standard .com domains are $8.88 at Try some different ideas out in their search bar to see what’s available. Premium domains will certainly cost more (domains can be tens of thousands of dollars). I never spend more than ten dollars on a domain. I use the search tool to brainstorm ideas until I find something that’s affordable and works. If you have a brand name that you need to maintain, play with variations or different TLDs (.net, .info, etc.). I prefer to be flexible when building a new affiliate website.

Here are a few tips for choosing a web domain:

  • Within your budget. I never spend more than $10
  • Choose a .com TLD where possible, it’s the most trusted TLD
  • Make it relevant to your niche
  • Keep it on the shorter side so its easier for readers to remember

Once you’ve found a domain name you’re happy with, add it to your shopping cart.

Step 3: Checkout with your new domain

This is where you spend your first bucks. Go to your shopping cart at You should see your domain name there. Delete anything you don’t want.

Here, they’ll try to upcharge you with some options. I never buy a new domain for more than one year, because if the idea does pan out I can abandon it. If it’s working well, I’ll renew the following year, sometimes for multiple years. You will have to pay the ICANN fee (it’s like $0.18).

WhoisGuard should be free forever with, so keep that selected.

We’re going to talk hosting and WordPress below. Namecheap offers options for these. If you want to pay for the convenience, be my guest. My solution will take a few more minutes, but me much more affordable.

PROMO CODES: Do not checkout before trying some promo codes. Namecheap always has offers. If you use Honey, try the codes they suggest. You may also find good promos right on the website. Look for deals here.

Ready? Grab that credit card or connect your PayPal account and checkout. I was out-the-door with for $8.17 for one full year, including fees and after a promo code.

Congrats! You are now the proud owner of an affiliate marketing web domain.

The Best Hosting for Affiliate Marketing Websites

Forgive the kitschy SEO subheading. I have no idea what the best hosting for affiliate marketing websites is. But I use (NFSN) for all of my hosting (and you know this is honest because there’s no affiliate program here).

What do I like about Mostly, I’m a fan of their pricing structure. It’s a pay-as-you go model, so you fund your account and they draw on it as needed. You can set alerts at $5 and $1 to remind you to fill it back up. My median hosting fee for active websites on is less that $4 (and my average is barely above $4). This includes my DNS (domain name system), MySQL hosting, and all storage. This is perfect for smaller affiliate sites that aren’t yet getting a ton of traffic, because you don’t end up paying for visitors you aren’t getting.

Yes, is a little more DIY, but it really isn’t difficult to get setup with some good documentation. The minimal effort is definitely worth the long-term cost savings.

Step 4: Become a member with

You know the drill. Visit and follow the instructions. Your account is called a “membership” here, and membership is totally free. As per their instructions:

  1. Create a membership.
  2. Confirm your email address.
  3. Add a personal bandwidth account.

You’ll create Bandwidth Account in this step. The Bandwidth Account is how you’ll pay for your hosting. One nice thing about is that your membership can include several Bandwidth Accounts if you want to manage your websites separately. I manage most of mine through a single Bandwidth Account.

  1. Fund your personal bandwidth account.

It’s totally fair to start with only $10 in your account. It will probably take most websites a couple months to burn through those. You can even get started with less. Try $5 if you’re feeling extra frugal.

Here are my charges for one of my sites for a full year (2020):

  • Site Charge – $18.13
  • Resource Charge – $16.56
  • Site Storage Charge – $3.80
  • .db MySQL Charge – $3.11
  • .db MySQL Storage Charge – $1.38
  • .com DNS Charge – $1.22

These costs will vary a bit depending on the size of your site and the amount of visitors you receive. One of my sites I host a SQL database for some data projects, and my .db MySQL charge is about 5x higher

  1. Set up a web site.

This is the fun part. If anything I’ve said up til now is confusing or unclear, please let me know in the comments of this post. I want to make this as easy as possible, so I’ll happily clarify for you and update this post as necessary. I’ll break down NFSN’s “Step 6” below, but their documentation may be enough.

Step 5: Create A New Site with NFSN

After you’ve joined NFSN and added funds to your bandwidth account, navigate to to create your first site.

From the dropdown, select the account you funded (you’ll pay for this website from that account).

Then, create a “short name” for your site. I usually just use the domain name without the www or .coms. I.e., if I’m creating, my short name would just be example.

After clicking “Next”, you’ll set up the Canonical Name for your site. I like to use the www version for the Canonical Name, then a version without as an alias (the alias field will present itself once you’ve typed in your Canonical).

Check Yes to set up DNS for the domain you purchased from Namecheap.

On the Next page, you’ll be given options for your Server Type. To the lay-person, this may read like a different language. You’ll see costs involved here, but they are all the same. For our WordPress setup, we’ll want the PHP. Keep the first Radio button selected for Apache 2.4, PHP, CGI and click Next.

Now, for Site Plan, we’ll be setting up a Production site. We can’t use Non-Production, because we’re making an active Affiliate Marketing Website, which is revenue-generating (hopefully). The cost of this if $0.05 a day (that’s already been taken into account in the funding step). Select Production and click Finish.

You’ll be given the opportunity to review all of the above. Look good? Click Create This Site. It will take you to an info page with all the details of your site. We’ll come back here later.

Step 6: Connect your DNS

Okay, so now you’ve purchased a domain with and created a site with, but we need to get those two services talking to each other. We do that by pointing our domain from our Registrar to our host DNS.

On (NFSN), click the “domains” tab at the top. You should see a row with your domain name, the associated account number, and some other details. Under the DNS column, click the free Manage button.

Note: you can register a domain here, if you really want to, but it’s more expensive and not as useful of a search feature.

At the top of the page listed, there should be a box with two Authoritative Name Servers. They are probably identical except for digits that are different. Yours will likely be different than mine.

Copy one of these, and switch tabs to Make sure you are still logged in, and navigate to On this page, click the MANAGE button in the table row that corresponds with your new domain:

On the next page, make sure the Domain tab is selected. Four or five rows down, there should be a field for “Nameservers”. In the dropdown, switch from “Namecheap BasicDNS” to “Custom DNS”. Populate Nameserver1 and Nameserver2 with the Authoritative Name Servers from Nearlyfreespeech. Then click the little green check in that row to save your changes.

If you want to check and see if this worked, wait a minute or two and visit your domain. At this point, you should get a “403 Forbidden” error on, but you’ll see NearlyFreeSpeech Error 403 in the bottom right hand corner. So, your domain now knows NFSN is the host.

Step 7: How to Install WordPress on

Installing WordPress is where things become a bit more “technical”. Honestly, NearlyFreeSpeech offers an unbeatable walk-through for installing WordPress on sites they host. I’ll try to translate here in layman’s terms, but if you’d rather skip my Step 7 and follow their walk-through, I highly recommend it:

NFSN provides the WordPress CLI (Command Line Interface) that makes managing and updating your WordPress instance super easy. In the following steps, we’ll set up a SQL Database and get familiar with SSH for our website. You’ve come this far, so stay with me!

7a: Creating a MySQL process and database

All the data for your WordPress site, posts, pages, etc. will be stored in a MySQL database. So we need to create one of those. While logged in with your membership at, click the “mysql” tab at the top. On the right hand side of the page, in the green box, click “Create a New MySQL Process”.

Name your process. I usually name mine the same as the site short name. Select your Funding Account (again, this is already accounted for in our budgeted funding. Nothing extra here), and the newest version of MariaDB:

Select “Create New Process” and return to your MySQL tab. After a minute or two, check your email, whichever email address is associated with your Nearlyfreespeech membership. There should be an email with the subject [NearlyFreeSpeech.NET] MySQL Process Setup Information. This email has three important pieces of information in it:

  1. MySQL Hostname (DSN): yourdomain.db (or whatever name you chose above)
  2. MySQL Admin Username: This should reflect your NFSN username
  3. MySQL Admin Password: this is a randomly generated password. Copy this somewhere safe, write it down, hide it away in your email. DON’T LOSE IT

Now that you have a MySQL Process, you need a MySQL Database. Back in the “mysql” tab of Nearlyfreespeech, click the DSN of the database you just created (that short name plus “.db”, #1 from the email you received).

This will take you to a page with information about the Process you just created. In the green box on the right, click “Create a Database”. Your process name should be populated already. Think up a new Database name. I usually just use “wordpress”, because this is our WordPress Database. The username and password fields are the ones from the email you received.

You should get a notification that the Database has been created. Click the button to Return to MySQL Information.

7b: Create a WordPress User for your Database

Nearlyfreespeech recommends creating a unique user to “manage” the WordPress database. So, you have an admin user that you just used to log in, but we want to create a 2nd user that will represent your WordPress instance.

These instructions are straight from the Nearlyfreespeech documentation, but I’ve added a little clarification:

  • Click on the MySQL tab in the member interface
  • Click “ Open phpMyAdmin “ in the Actions box. (Green box, upper right hand corner)
  • Enter the DSN (“Server”) of your MySQL Process, MySQL username, and MySQL password. The DSN and username can be found on the Process Information page in our member UI. (This is what we used in the last step, from that email you received.)
  • Click on the “User accounts” tab as the top
  • Click “Add user user account” (in the “New” box)
  • Give the user a descriptive name. We’ll use exampledbuser here, but you should pick something better, like wpuser or something representative of your blog.
  • Make sure to leave the Host: selectbox on “Any host.” Keep the “%” in the field
  • Click the “Generate” link to generate a nice strong password.
  • Use cut and paste to copy the new password somewhere, you’ll need it later. (We’ll use dbpassword here.) Do not lose this password.
  • Grant the following permissions to the new user:
    • All the permissions except “file” in the “data” box,
    • Everything in the “structure” box, and
    • “LOCK TABLES” in the “administration” box.
  • Click the “Go” button in the lower left.
  • Exit phpMyAdmin.
7c: SSH Into Your Website

Now we’re really technical. Stay with me, though, this is where we start to see fruits. Follow along carefully and you’ll be just fine.

For this step, you’ll need a Command Line tool. If you’re on Mac OS or Linux, you can use your system terminal (on Mac, type Command+Space, then search Terminal). If you’re on a Windows machine, you’ll want to download PuTTY.

In your command line tool (again, I’m using Terminal), you’ll want to type something like this (or copy/paste):


Replace yourusername with your NFSN username, and siteshortname with the short name assigned back in Step 5. Keep them separated by the underscore. With this full string in your terminal, press enter.

You will be prompted for your NFSN member password. As you type, the space will remain blank. That’s okay, just type your password and hit enter. It should log you in to /home/public

Easy peasy.

7d: Download WordPress

Now that you’ve SSH’ed into your site, we can download and install WordPress. We’re going to do this directly into our /home/public directory. Nearlyfreespeech supports the WordPress CLI, which makes this all pretty simple.

In your Terminal run this command, (type or copypaste and hit enterreturn):

wp core download

WordPress is now downloaded into your site Directory, but we need to get it configured.

7e: Configure WordPress

Now that WordPress has been downloaded to your site directory, we need to connect it to our database. For this, make sure you have your password from step 7b handy, and your other database info. Here’s what you need:

  • database server (yourdomain.db)
  • database name (I called mine wordpress in step 7a)
  • db username (The one you created for WordPress)
  • db password (The one you generated in PHP Myadmin)

Back in your command line tool, run a command like this, but with your details:

wp core config --dbhost=affiliatecamper.db --dbname=wordpress --dbuser=wpuser --dbpass=YOURPASSWORD

This command creates a configuration file called wp-config.php that allows WordPress to access your database via the WPuser you set up. You’ll want to change the permissions of this file with the following command in your Terminal interface:

chmod 644 wp-config.php

7f: Install WordPress

Now you have WordPress downloaded to your site, and configured to manage your database. Now we’re going to Install it. You’ll have the option to create a login. This login is how you will access the WordPress CMS to write posts, install themes/plugins, and more. You’ll also create a title here, but all these things can be easily changed later once we’re in the WordPress CMS:

Run this command to install WordPress on Nearlyfreespeech:

wp core install --title="Affiliate Camper" --admin_user=any_username_you_want --admin_password=a_password_you_will_remember

After a few seconds, you should receive a response that says “Success: WordPress Installed Successfully”.

Woohoo! Now you can open your web browser and navigate to, where you’ll be able to log in to your new WordPress Dashboard with the username and password you just created. At this point, you can start installing themes, plugins, and creating posts or pages, but we recommend a few more steps to keep the machine well-oiled.

Step 8: Set up .htaccess for your new website

A properly designed .htaccess file will enable the peralinks on your site to work properly. This is a two-part process that will start in the WordPress Dashboard you just logged and finish back in the Command Line Tool you’ve been using (still SSH’ed into your site).

In your WordPress Dashboard, look at the sidebar. Navigate to Settings Permalinks.

Now, decide the best permalink structure for your site. If your posts are timely (time-sensitive), you may want to include dates. I like to keep things as simple as possible, so I’m going with the Post name selection. I’ll write a post dedicated to this soon, and try to update with a link here when it’s ready.

Once you’ve selected a permalink structure, click Save Changes. Once saved, two things should happen on this page. You should see an alert in a green box at the top that says: “You should update your .htaccess file now.” At the bottom of the page, you should see a box a little bit of code in it:

We don’t actually want the entire code for Nearlyfreespeech. Copy everything except the first and last lines (exclude the <IfModule lines). We’re going to create our .htaccess directly from the Command Line Tool, so switch back to Terminal or PuTTY, and make sure you’re still SSH’ed into your site. My command looks like this:

cat >.htaccess <<NFSNRULES ## This is a shell command, not part of .htaccess!
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

If your rewrite rules are different, copy and paste them over mine (but keep the first couple lines). It should be the same, though.

Step 9: Enable File Editing

This step is important to make sure you can add images and other files to your WordPress site, so don’t skip it. In your SSH terminal, make sure you’re in /home/public/ (or wherever your base directory is) and run these commands in order, one after the other:

  • wp config set FS_METHOD direct
  • cd wp-content (moves you to a new folder)
  • mkdir -p uploads (creates a new directory/folder for uploads)
  • chgrp -R web uploads
  • chmod -R 775 uploads

Now you’ve got file editing in your Affiliate Marketing Site.

Step 10: Themes and Plugins

Nearlyfreespeech recommends installing and activating Themes and Plugins from the Command Line, for security reasons. This can be rather cumbersome, so if you’d like to manage your WordPress Themes and Plugins from your WordPress Dashboard, consider this recommendation from Christopher Lis. My personal recommendation is to manage Themes and Plugins from Command Line, it will keep you safe, and it’s very easy to do.

10a: Installing and Activating WordPress Themes from Command Line

Installing WordPress themes from Command Line is easy. Pick a theme you like. Something lightweight that gets the job done. I usually install OceanWP on my sites, because it’s simple and free, but has good customization. It also plays well with WooCommerce if you want to add a store to your site. This can be installed on your WordPress site with two simple commands (return to your /home/public directory by running cd ...

  • wp theme install oceanwp
  • wp theme activate oceanwp

OceanWP is now installed! If you want to “test” it out, you can preview the theme from your WordPress Dashboard Appearance Themes section before activating.

You can also deactivate and uninstall themes just as easily. Activate a new theme, then use wp theme uninstall oceanwp to remove the theme. It’s a good idea to remove clutter for your Themes folder to keep your site running fast and lightweight.

10b: Installing and Activating WordPress Plugins from Command Line

This works exactly the same as installing and activating theme. To install and activate WordPress Plugins from command line, just run the same two simple commands. As an example, I’m going to install Yoast SEO Tool:

  • wp plugin install wordpress-seo
  • wp plugin activate wordpress-seo

You can also use deactivate and uninstall to remove WordPress plugins via Command Line.

Step 11: HTTPS Certificate (TLS)

Your website is now mostly complete, but we still need a TLS certificate. This will allow your website to get that https:// prefix with the secure lock beside the URL. This is important for customer trust, SEO, and more. You can get a TLS certificate for free with Let’s Encrypt, and it’s super easy.

Back in Command Line run the following:

It will ask if you accept the Let’s Encrypt Subscriber Agreement. Type y and hit return. It may take a couple minutes to finish setting TLS Encryption, so wait for it to do it’s thing.

When it’s done, head back to your WordPress Dashboard. You may need to log in again. Navigate in the sidebar to Settings -> General and update your Site URL and Address URL with HTTPS versions of your domain.

That’s usually enough, but if you’re having trouble, try this fix: Go to your command line tool, at the base directory (/home/public) and type wp config edit. This will pull up your WordPress Config file in command line. Hit the letter “i”, which will allow you to edit this. Scroll to the very end (you may need to use arrow keys), after the final semi-colon. Hit enter a couple times to get you on a new line, and paste this code:

/** HTTPS Forwarding */
if ( $_SERVER[ 'HTTP_X_FORWARDED_PROTO' ] == 'https' ) $_SERVER[ 'HTTPS' ] = 'on';

Make sure it’s pasted exactly like that. Hit Esc, then type :wq (this means Write the changes, Quit the editor). Hit enter. You’re done. This can be tricky, if you have trouble, please leave a comment on this post and I’ll attempt to help you troubleshoot.

Your Affiliate Marketing Site

Well, that’s it. You made it to the end. If you’ve followed along this entire time, I am truly grateful. Your site is up, active, and ready for action. Visiting your domain ( should present something similar to mine, at this point:

Please, if you found this helpful and useful, I’d appreciate it if you let me know. The easiest way to do this is to just let me know in the comments. Even if you struggled somewhere along the way, have an extra tip, or think this is all completely unnecessary, tell me in the comments!

You can also Pin this post. Tweets and FB shares are great, too, but Pinterest is the best way to share this so it sticks around. Pin the cool graphic below.

How I Build My Affiliate Marketing Websites For Less Than $20

Win Pratt

Win Pratt is a full time data analyst and data engineer, focused primarily on Web Analytics.