Skip to content

Setting Up Your First Domain

This guide walks you through adding a domain and getting it verified so AffRank can start injecting affiliate links.

Step 1 — Add your domain

  1. Log into your AffRank dashboard
  2. Go to Domain & Script
  3. Click Add Domain
  4. Enter your domain without the protocol — myblog.com, not https://myblog.com
  5. Click Save

Your domain appears in the list with status Unverified.

Step 2 — Install the script

Copy your script tag from Domain & Script:

<script src="https://api.affrank.ai/api/affiliate/engine/YOUR_USER_ID.js"></script>

Paste it into the <head> of your site. Platform-specific instructions:

  • WordPress — Install the Insert Headers and Footers plugin, paste into the Header section
  • Shopify — Online Store → Themes → Edit code → theme.liquid → paste before </head>
  • Webflow — Site Settings → Custom Code → Head Code
  • Squarespace — Settings → Advanced → Code Injection → Header
  • Wix — Settings → Custom Code → Head → Add to all pages
  • Next.js — Add to <Head> in _document.js or layout.tsx
  • Google Tag Manager — Create a Custom HTML tag with the script, trigger: All Pages

Step 3 — Verify your domain

Verification checks that your script is loading on live visitors’ browsers.

  1. After installing the script, open your website in a browser (actually navigate to a page — just having a tab open isn’t enough)
  2. Return to the AffRank dashboard within 10 minutes
  3. Click Verify next to your domain
  4. You’ll see a green checkmark when confirmed

Verify button not turning green?

  • Make sure you visited a page on the domain (not just a staging URL)
  • Confirm the script is in <head>, not in the body or footer
  • Try verifying immediately after a fresh page load — don’t wait

With your domain verified:

  1. Go to Affiliate Links
  2. Click Add New Link
  3. Enter the keyword (e.g., best web hosting) and your affiliate URL
  4. Click Save

The script will now look for that keyword in your pages and wrap it in the affiliate link automatically.

Next steps