Skip to content

Setting Up Your First Domain

Learn how to set up and verify your first domain for affiliate tracking.

Before You Start

Make sure you have:

  • Active AffRank account
  • Access to your website’s code (or website admin panel)
  • Your website is already live/public
  • 5-10 minutes to complete setup

Step 1: Add Your Domain

In Your Dashboard

  1. Navigate to Domain Management
  2. Click Add New Domain
  3. Enter your domain name:
    • example.com (not www.example.com)
    • blog.example.com (if using subdomain)
  4. Select your domain’s primary language
  5. Click Add Domain

Your domain is now registered in AffRank!

Step 2: Install the AffRank Script

Get Your Script

  1. Go to Script Generator
  2. Click Copy Script to copy your tracking script
  3. Script looks like:
    <script src="https://affrank.io/script/YOUR_USER_ID.js"></script>

Install on Your Website

Copy and paste the script into your website’s <head> section:

<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
<!-- Paste AffRank script here -->
<script src="https://affrank.io/script/YOUR_USER_ID.js"></script>
</head>
<body>
...
</body>
</html>

For WordPress, Shopify, Wix, Squarespace, Webflow: Use your platform’s header code injection or custom code section to add the script to the <head> tag.

Verify Script Installed

  1. Visit your website
  2. Press F12 (Developer Tools)
  3. Go to Console tab
  4. You should see: AffRank v1.x loaded successfully

If you don’t see this:

  • Check script is in <head> tag
  • Verify URL is correct
  • Clear browser cache
  • Try different browser

Step 3: Verify Your Domain

After script is installed:

  1. Go back to Domain Management
  2. Find your domain
  3. Click Verify Domain button
  4. AffRank checks for script installation
  5. Domain automatically verifies ✅

This usually takes 1-5 minutes

If Automatic Verification Doesn’t Work

Try these methods:

Method 1: Wait and Retry

  • Wait 10 minutes
  • Visit your website again
  • Click Verify again

Method 2: HTML File Verification

  1. Click Verify Domain
  2. Select HTML File method
  3. Download verification file
  4. Upload to domain root (example.com/verification.html)
  5. Click Verify

Method 3: DNS Verification

  1. Click Verify Domain
  2. Select DNS method
  3. Copy DNS TXT record
  4. Add to your domain’s DNS settings
  5. Wait up to 24 hours for propagation
  6. Click Verify

Domain is verified! Now add a link:

  1. Go to Affiliate Links
  2. Click Add New Link
  3. Enter keyword: best web hosting
  4. Enter affiliate URL: https://myaffiliate.com/hosting
  5. Click Create Link

Step 5: Create Content with Keywords

For AffRank to insert links:

  1. Write content with your keywords
  2. Include phrases like “best web hosting”
  3. Publish on your website
  4. AffRank will automatically add links

Example

Looking for the best web hosting?
Many people ask me about the best web hosting for beginners.
The answer depends on your needs...

AffRank will convert “best web hosting” to an affiliate link automatically.

After content is published:

  1. Go to Analytics Dashboard
  2. Wait 5-10 minutes for data
  3. You should see:
    • Pages analyzed
    • Links inserted
    • Clicks (if anyone visits)

Troubleshooting Setup

Domain Won’t Verify

Problem: Script installed but domain won’t verify

Solutions:

  • Verify script is in HTML head tag
  • Wait 10 minutes and try again
  • Check script works (F12 console)
  • Try DNS or HTML file method
  • Contact support

Script Not Loading

Problem: Console doesn’t show AffRank message

Solutions:

  • Verify User ID is correct
  • Check script is properly closed: </script>
  • Clear browser cache: Ctrl+Shift+Del
  • Try incognito window
  • Check browser console for errors

Problem: Script loads but links aren’t inserted

Solutions:

  • Verify keywords match your content exactly
  • Wait 10 minutes for sync
  • Check that link is active (not paused)
  • Verify you’re on published website
  • Check script runs without errors

Next Steps

Success Checklist

✅ Domain registered in AffRank ✅ Script installed on website ✅ Script loads in browser console ✅ Domain verified ✅ First link created ✅ Keywords in your content ✅ AffRank inserting links automatically ✅ Analytics showing data

Congratulations! Your AffRank setup is complete! 🎉