Can JavaScript override a nofollow meta tag?

December 17, 2018

Suppose you find yourself in a situation where you want Google to index certain pages, but you are required to use a template that uses the “nofollow” robots.txt meta tag. Can you use JavaScript to remove the tag when the page is fully rendered so that Google will index it?

This question was recently posted in the TechSEO subreddit. John Mueller, Google Senior Webmaster Trends Analyst, responded that Google will use the most restrictive setting you have on the page, regardless of how it’s included.

Using the “noindex” tag is just about the most restrictive condition you can apply to a page — you are literally telling Google to ignore the page. If a page has a “noindex” in static HTML, and JavaScript is used to remove it when the page is rendered, Google will still see the “noindex” and comply with the request.

“Noindex” overrides other robots.txt meta tags as well. For example, if you have a “noindex” + “index”, then the “noindex” will override the “index.” Moreover, if a page doesn’t even have any meta tags, and for some reason you use JavaScript to add a “noindex” tag, Google will honor the “noindex” request.

The bottom line: JavaScript can be a very powerful workaround for many limitations or requirements, but in the case of “noindex” it simply won’t work.


Share this article:
 

eHost-square-ad Theme Builder Layout

We’re listening.

Have something to say about this article? Share it with us on Facebook, Twitter or LinkedIn:

SHARE IT HERE:

Related Posts

smx-overtime-managing-your-online-business-reviews Theme Builder Layout

SMX Overtime: Managing your online business reviews

Last month I spoke at SMX East about scaling online reputation management – specifically reviews. At the end of my presentation, “14 Tips to Scale Reviews Across Multiple Locations,” I fielded a number of fantastic questions from session attendees and wanted to...

Get ALL Your SEO, WordPress & Divi News

Join Our Daily Roundup

SEO News and More

Subscribe ToThe Weekly SEO Trade News Updates

Get the latest SEO, SEM and SMM marketing intel, tips and tricks from one of the best SEO Gurus online. 

Every Tuesday morning we send out an aggregated email listing all new posts on SEO Trade News.

Excellent! Now check your email to confirm your subscription.