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
- Log into your AffRank dashboard
- Go to Domain & Script
- Click Add Domain
- Enter your domain without the protocol —
myblog.com, nothttps://myblog.com - 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.jsorlayout.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.
- After installing the script, open your website in a browser (actually navigate to a page — just having a tab open isn’t enough)
- Return to the AffRank dashboard within 10 minutes
- Click Verify next to your domain
- 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
Step 4 — Add your first affiliate link
With your domain verified:
- Go to Affiliate Links
- Click Add New Link
- Enter the keyword (e.g.,
best web hosting) and your affiliate URL - Click Save
The script will now look for that keyword in your pages and wrap it in the affiliate link automatically.
Next steps
- Managing Affiliate Links — add more links, enable cloaking
- Installing on specific platforms — detailed per-platform steps
- Click Analytics — see your first clicks come in