Hey just need help on the process to add meta robots "noindex" tag in the <head> section for webpages that are dynamically generated on selecting filters. So this should allow me to block them from showing up insearch results
I could not use robots.txt method as these pages are used as inlinks
Iam also looking out for suggestions to place canonical pointing to master page on these dynamic pages.
Please do let me know with relevant steps to solve this issue
Thanks
Raghavarao
Solved! Go to Solution.
Views
Replies
Total Likes
Hey Avinash,
Thanks for help ,
but had a concern,
can you please let me know if will be able to access this setup for dynamically generated pages.
since we canot predict the url of dynamic pages which are driven through filters,i think we need to automate this functionality to trigger this noindex or canonical on dynamically generated pages case by case
i hope the above process can help me in implementing noindex or canonical for static pages
Are you creating the dynamic pages through code? If yes, in that case you would have to apply additional logic in your code. Adding these properties, generates the following properties in the page jcr:content as mentioned in the below screen shot. You would have to add these properties through code while generating these pages.
cq:robotsTags
cq:canonicalUrl
Another option to explore is adding the no index tag as a response header from Dispatcher(Apache) if you have a common URL pattern for those dynamic pages(if you want to add it to the page source, enable the header through your page rendering component based on the content path or follow the suggestion from @Avinash_Gupta_ )
<If "%{REQUEST_URI} =~ m#^/category1#">
Header set X-Robots-Tag "noindex, nofollow"
</If>
Regards
Albin
AEM OOB page properties provides you the option to add no-index tag and set cannonical URL
1. Go to the page and open its page properties.
2. Navigate to the Advanced section and scroll down.
3. Apply the no-index and cannonical url as mentioned in the below screenshot
Hope this helps.
Hey Avinash,
Thanks for help ,
but had a concern,
can you please let me know if will be able to access this setup for dynamically generated pages.
since we canot predict the url of dynamic pages which are driven through filters,i think we need to automate this functionality to trigger this noindex or canonical on dynamically generated pages case by case
i hope the above process can help me in implementing noindex or canonical for static pages
Are you creating the dynamic pages through code? If yes, in that case you would have to apply additional logic in your code. Adding these properties, generates the following properties in the page jcr:content as mentioned in the below screen shot. You would have to add these properties through code while generating these pages.
cq:robotsTags
cq:canonicalUrl
Hi @Avinash_Gupta_ ,
The method really help me solving the issue .Thanks for taking some time in and letting me know this method.
Regards
Raghavarao
Another option to explore is adding the no index tag as a response header from Dispatcher(Apache) if you have a common URL pattern for those dynamic pages(if you want to add it to the page source, enable the header through your page rendering component based on the content path or follow the suggestion from @Avinash_Gupta_ )
<If "%{REQUEST_URI} =~ m#^/category1#">
Header set X-Robots-Tag "noindex, nofollow"
</If>
Regards
Albin
Hey @Albin_Issac
I haven't used this method, but possibly will use this in future if applicable,
But ,thanks for taking some time in and letting me know this method.
Regards
Raghavarao