Joe Bloggs
Joe Bloggs

Reputation: 1462

"rel=nofollow noopener" - Possible to have both at the same time?

I've got a pdf that I'd like to protect and don't want search engines to index it.

Currently, my link is as follows:

<a href="https://example.com/mypdf.pdf" target="_blank" rel="noopener">View PDF</a>

Would I be able to add nofollow tag to the rel tag?

Would I then divide these two with a coma or no coma?

Currently trying rel=nofollow noopener without coma.

Would I be able to add noindex to the same tag?

<a href="https://example.com/mypdf.pdf" target="_blank" rel="nofollow noindex noopener">View PDF</a>

Would this work?

Upvotes: 17

Views: 46035

Answers (1)

jameshenry10
jameshenry10

Reputation: 349

"nofollow" tag tells search engines "don't follow this link."

"noreferrer" tag indicates no referrer information to be leaked on this link.

"noopener" tag prevents the new page from being able to access the window.opener property (preventing malicious javascript).

you can use both something like this:

<a href="https://example.com/mypdf.pdf" target="_blank" rel="nofollow noopener">View PDF</a>

"noindex" you can't noindex a link. That would have to be defined on-page, in the meta data.

You're better off blocking pages in robots.txt if that's what you're after.

User-agent: * 
Disallow: /mypdf.pdf

Upvotes: 34

Related Questions