Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"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?

like image 711
Joe Bloggs Avatar asked Aug 23 '17 03:08

Joe Bloggs


1 Answers

"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
like image 82
jameshenry10 Avatar answered Sep 28 '22 08:09

jameshenry10