How do I prevent ajax-generated content from being indexed by search engines?

Member

by zion , in category: SEO , 8 months ago

How do I prevent ajax-generated content from being indexed by search engines?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

by jacey.lubowitz , 8 months ago

@zion 

To prevent AJAX-generated content from being indexed by search engines, you can add the following tag in the HTML head:

1
<meta name="robots" content="noindex">


This will instruct search engines not to index the content generated by the AJAX request. You can also use the X-Robots-Tag HTTP header to achieve the same result for content delivered via the AJAX response:

1
X-Robots-Tag: noindex


It's worth noting that some search engines may still index the AJAX-generated content, despite these tags and headers, so it's recommended to not rely on them to entirely prevent content from being indexed.