How to Add Nofollow Links in Squarespace (3 Methods)

Squarespace text blocks have no rel option, so use a Markdown block, a Code block, or a script that tags affiliate links automatically.
To add a nofollow link in Squarespace, put the link in a Markdown block or Code block and write it as HTML with a rel attribute, for example <a href="https://example.com" rel="nofollow">anchor</a>. Squarespace's standard text block has no nofollow toggle, so for many affiliate links a small script in Code Injection can add "nofollow" or "sponsored" automatically.
The method you pick depends on how many links you need to tag and which Squarespace plan you are on.
Key takeaways
- Squarespace text blocks do not offer a rel option, so every link added there is a normal followed link.
- A Markdown block or Code block lets you write the HTML link yourself with rel="nofollow", rel="sponsored", or rel="ugc".
- A script in Code Injection can tag many affiliate links at once, but Code Injection needs a Core, Plus, or Advanced plan (or a qualifying legacy plan).
- Google treats nofollow, sponsored, and ugc as hints, and asks you to qualify paid and affiliate links.
- Always check the published page source, because a typo in the HTML silently leaves the link followed.
Why Squarespace needs a workaround
The link editor only asks for a URL and whether to open it in a new tab.
Site builder Chris Curry explains that you cannot add a nofollow link inside a normal text block. You need the Markdown block, which accepts HTML as well as Markdown syntax.
Travel blogger Ready Set Jet Set notes the same default: a link without extra code is followed. The post gives copy-and-paste snippets for both "nofollow" and "sponsored".
If you are new to the attribute itself, start with dofollow vs nofollow links.
Method 1: Use a Markdown block
This is the simplest option and works on every plan.
- Open the page or blog post in the editor.
- Click an insert point and add a Markdown block.
- Type or paste your paragraph into the block.
- Replace the anchor text with the HTML link:
<a href="https://example.com/" rel="nofollow">anchor text</a>. - Save, then open the live page and check the result.
One catch: if only the link goes into the Markdown block, it sits in its own block with a gap above it. Put the whole paragraph into the Markdown block so the link stays inline.
You can still use Markdown for bold text, headings, and lists in the same block.
Method 2: Use a Code block
A Code block does the same job when you want full HTML control.
Add a Code block, keep it in HTML mode, and paste the paragraph with your link. Make sure "Display Source" is turned off, or visitors will see the raw code instead of the link.
Code blocks are handy for disclosure boxes, comparison tables, or styled callouts that contain several qualified links.
Plain HTML in a Code block works without Code Injection. Script tags are a different matter, as the next method explains.
Method 3: Tag affiliate links with a script
For dozens of affiliate links, editing each one by hand gets old fast.
SQSP Themes founder Omari Harebin describes a setup where every affiliate URL runs through a path such as /recommends/. A short script then finds those links and adds the attribute.
His tutorial shows a script that targets every external link containing "recommends" and adds rel="sponsored". That turns affiliate tagging into a one-time job.
A simplified version looks like this. Paste it into Settings, then Advanced, then Code Injection, in the footer field:
<script>
document.addEventListener('DOMContentLoaded', function () {
document.querySelectorAll('a[href*="/recommends/"]').forEach(function (link) {
link.setAttribute('rel', 'sponsored nofollow');
});
});
</script>
Adjust the selector to match your own affiliate path or partner domains.
For the right value to use on these links, read should affiliate links be nofollow or sponsored.
Plan limits for scripts
Code Injection is not on every Squarespace plan.
Squarespace studio Beyondspace lists Code Injection as unavailable on the new Basic plan and available on Core, Plus, and Advanced.
A 2026 guide by Lilach Bullock confirms that, as of October 2026, Code Injection is on Core, Plus, Advanced, and some legacy plans. It adds that Squarespace support will not help with custom code problems.
Microsoft's Clarity setup guide also notes that its script works only on Squarespace plans that support full JavaScript customisation.
On a plan without scripts, stick to Methods 1 and 2.
Which method to choose
Match the method to the number of links and your plan.
| Situation | Best method | Plan needed | Effort |
|---|---|---|---|
| One or two links in a post | Markdown block | Any plan | Low |
| A styled box or table with links | Code block (HTML only) | Any plan | Low to medium |
| Many affiliate links across the site | Script in Code Injection | Core, Plus, Advanced, or qualifying legacy | One-time setup |
| User comments with links | Comment settings or moderation | Any plan | Ongoing |
Which rel value to use
Google offers three values, and you can combine them.
Google's guide to qualifying outbound links defines them:
- "sponsored" for links that are ads, sponsorships, or other paid placements, including affiliate links.
- "ugc" for links inside user-generated content such as comments and forum posts.
- "nofollow" for other cases where you do not want to vouch for or pass ranking credit to the linked page.
Google's 2019 announcement explained that all three became hints rather than strict directives. Google may still use them to understand links.
For a full comparison, see sponsored vs nofollow vs UGC.
When you should qualify a link
The rule is simple: if money or a free product changed hands, qualify it.
Google's spam policies list buying or selling links that pass ranking credit as link spam. That covers paid guest posts, sponsored reviews, and affiliate links.
Editorial links to sources you cite do not need nofollow. Linking out normally to helpful pages is expected.
If you are unsure where your line sits, read are paid links against Google guidelines.
How to check your nofollow links
Never assume the attribute stuck; verify it on the live page.
- Open the published page in Chrome.
- Right-click the link and choose Inspect.
- Look for
rel="nofollow"orrel="sponsored"inside the<a>tag. - For script-based tagging, inspect after the page has fully loaded, since the attribute is added by JavaScript.
A browser extension that highlights nofollow links speeds this up across long posts.
Remember that script-added attributes depend on the script running. Google renders JavaScript, but plain HTML in a Markdown block is the most reliable signal.
Common mistakes
Most problems come from small HTML errors.
- Curly quotes. Pasting from a word processor can turn straight quotes into curly ones, which breaks the attribute.
- Display Source left on. In a Code block this shows raw code to visitors.
- Link split from its paragraph. Adding only the link to a Markdown block leaves an awkward gap.
- Script selector too broad. A selector like
a[href^="http"]would nofollow every external link, including editorial citations. - Forgetting old posts. Affiliate links added before the script existed may use other URL patterns.
For the bigger picture on whether these links still matter, see do nofollow links help SEO.
Does nofollow stop Google from crawling the page?
Not necessarily.
Because nofollow is a hint, Google may still crawl and index the destination if it finds it elsewhere. If you want to keep a page out of the index, use a noindex directive on that page instead.
Read more in does Google follow nofollow links.
Frequently Asked Questions
Can I add nofollow in a Squarespace text block?
No. The standard text block link editor has no rel option. Use a Markdown block or Code block and write the link as HTML with the rel attribute.
Do I need a Business or Core plan to add nofollow links?
Not for single links. Markdown and Code blocks with plain HTML work on any plan. You only need Code Injection, available on Core, Plus, Advanced, and some legacy plans, to run a site-wide script.
Should affiliate links on Squarespace use nofollow or sponsored?
Google asks you to mark paid and affiliate links with rel="sponsored". You can also write rel="sponsored nofollow" to cover crawlers that only read nofollow.
Will the nofollow attribute survive a template change?
Yes, if it is written in a Markdown or Code block, because the HTML lives in the content. A script in Code Injection also stays in place, though you should retest it after big design changes.
How do I check that a Squarespace link is nofollow?
Open the live page, right-click the link, choose Inspect, and look for rel="nofollow" or rel="sponsored" inside the link tag.
Sources
- Chris Curry: How to add a nofollow link in Squarespace
- Ready Set Jet Set: Squarespace help, how to do a no-follow link
- SQSP Themes: How to manage affiliate links in Squarespace
- Beyondspace: Which Squarespace plans include Code Injection
- Lilach Bullock: Squarespace custom CSS and Code Injection guide
- Microsoft Learn: Install Clarity on Squarespace
- Google Search Central: Qualify your outbound links
- Google Search Central Blog: Evolving nofollow (2019)
- Google Search Central: Spam policies, link spam
The BacklinkPrice Team researches backlink prices, publisher sites and link building tools. We check prices and plans against each provider's own pages and date them, so you know how current the numbers are.
More from BacklinkPrice TeamRelated guides





