How to add nofollow and sponsored links on Ghost

Disclosing affiliate links and sponsored content is crucial for SEO.
Significantly, since Google can penalize you at any moment if you don't do it. And we don't want that.
Unfortunately, Ghost doesn't have a way to do this without code. But I'll guide you through the process. It will be easier and will become second nature after a bit.
So, let's do the right thing and learn how to add this bit of code that will optimize your site even further.
Affiliate Disclaimer: Some links are affiliates. This means that if you buy after clicking on one of those, I get a commission at no additional cost for you.
TL;DR
- When something isn't available out of the box on Ghost, the solution usually is adding code. This isn't great, but at least it offers one way forward.
- This article shows in detail where you need to add
rel
to disclose your relationship with the pages you're linking to. - Relationship tags (
rel
) are important for search engines, and they can penalize you for not disclosing affiliate or sponsored content.
How to do add sponsored and nofollow tags
Below I show you a step-by-step of the code you need to add.
This is intended for beginners by including all the steps and instructions.
If you're a more advanced user, skip to the last step of each topic.
For links
Let's start with links in the body of the article.
First, add an HTML card.

Then, add the paragraph tags.
<p>
</p>
Next, you should add the sentence inside this paragraph.
<p>
This is a sentence inside the paragraph.
</p>
Follow that with adding the anchor (<a>
) tags for the link.
This anchor must include:
href="Url"
: the URL of the page you're linking to;target=_blank
: to open the link in a new tab;rel="attribute inside quotes"
: the relationship of the link.
Let's see an example:
<p>
This is a sentence inside the paragraph. <a href="https://www.thestackjunction.com/" rel="sponsored" target=_blank>This is the link</a>
</p>
You can use sponsored or nofollow. It depends on the situation.
For buttons
Now, let's see what HTML you should add for buttons.
The first step is to add an HTML card to the editor.
Next, add form tags (form
).
<form>
</form>
Inside the first form tag, add the following:
action="URL"
: the URL of the page you're linking to;target="_blank"
: to open the link in a new tab;rel="attribute inside quotes"
: the relationship of the link.
Like this:
<form action="URL" target="_blank" rel="sponsored">
</form>
The next step is to add the button tags (button
).
<form action="URL" target="_blank" rel="sponsored">
<button>Button text goes here</button>
</form>
Inside the first button
add type="submit"
.
<form action="URL" target="_blank" rel="sponsored">
<button type="submit">Button</button>
</form>
That's it.
Now, you have the code to modify rel
tags for buttons and links on your Ghost website.
To learn how to change the fonts and colors of these buttons, read this article or see this video.
Of course, it's less code and easier if you're using links as buttons as I do. But that's not the most correct solution on technical terms.
Why rel tags matter
Search engines what to know the relationship between websites in their quest to understand the web.
So, they want you to disclose when there's an incentive or relationship to give certain links.
This is where rel
tags make that job easier by providing context to links. If you want to learn more about these tags, read this article.
You should use rel="sponsored"
for affiliate links and sponsored content. And rel="nofollow"
for links on websites that you don't fully endorse.
In terms of rankings, search engines will treat sponsored, nofollow and UGC in the same way.
So, these links most likely won't count for rankings. But Google can decide to use nofollow links for rankings, as the article says.
Also, this means these 3 types of relationships will work like the original nofollow but now have more nuance to it.
If you want to deepen your knowledge about dofollow and nofollow links, read this article.
Plus, I could write more about this matter if there's enough interest.
Subscribe to newsletter about tech for blogs and newsletters
Final considerations
Hope you've learned what's required to add rel
tags on Ghost CMS, although the process is similar to other platforms.
Remember to always add rel="sponsored"
to affiliate links.
This way SEO Gods get pleased. And you can sleep better at night knowing your rankings aren't at risk by not following the rules.
Ghost could improve this and make it possible to add nofollow links by checking a box, but the world isn't perfect yet.
This article is part of a series where I talk about how to make your life easier using Ghost. Other articles of the series are How to make Ghost open links in a new tab and Sending posts by email.
If you want to start using Ghost, consider using my affiliate link below.
Thanks for reading!