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

Joe Bloggs picture Joe Bloggs · Aug 23, 2017 · Viewed 27.5k times · Source

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?

Answer

jameshenry10 picture jameshenry10 · Aug 23, 2017

"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