Rel Canonical, Follow/No Follow in htaccess?
-
Very quick question, are rel canonical, follow/no follow tags, etc. written in the htaccess file?
-
Hi
I dont think you can use rel-canonical tags in httaccess however you can define the rule for follow / no follow tag through htacess.
-
Hi there,
They'll be written in the source code of each applicable page.
Alternatively you can dynamically add these tags via google tag manager or within your CMS platform.
regards,
Sean
-
Robots directives and rel=canonical can be assigned by .htaccess. This is a very handy way to assign noindex or rel=canonical to .pdf documents, print formats, video transcripts, etc. You can also use it to apply noindex or rel=canonical at scale. Two Moz articles (of several) that describe these are....
https://moz.com/blog/how-to-advanced-relcanonical-http-headers
-
Hello,
Thank you for this information, but I have a followup question. The links you sent me refer to images and PDF's, but this isn't relative to my situation. I need to write in follow/no follow and rel=canonical via htaccess because I do not know how to do it for each individual page on my ecommerce store - additionally, htaccess is easy for me to edit if ever I need to undo something and it is nice to have everything in one place.
Can you give me a formatted example of how a follow/no follow and rel=canonical can be placed into a page via the htaccess file please? I intend on doing this for every product category, product and also my home page on my ecommerce store.
Thank you