Rel Canonical, Follow/No Follow in htaccess?
-
Very quick question, are rel canonical, follow/no follow tags, etc. written in the htaccess file?
-
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
-
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
-
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
-
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.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
How to no index / no follow CAD files .dxf .dwg
Hi, I have a new Wordpress site with a number of CAD files (.dxf& .dwg) downloadable straight from the site. These have been flagged in MOZ as warnings with everying from No Title/Description to duplicate content. Does anybody now how I would no index these type of files? Many thanks.
Technical SEO | | Jon_Pearce0 -
Duplication, pagination and the canonical
Hi all, and thank you in advance for your assistance. We have an issue of paginated pages being seen as duplicates by pro.moz crawlers. The paginated pages do have duplicated by content, but are not duplicates of each other. Rather they pull through a summary of the product descriptions from other landing pages on the site. I was planing to use rel=canonical to deal with them, however I am concerned as the paginated pages are not identical to each other, but do feature their own set of duplicate content! We have a similar issue with pages that are not paginated but feature tabs that alter the URL parameters like so: ?st=BlueWidgets ?st=RedSocks ?st=Offers These are being seen as duplicates of the main URL, and again all feature duplicate content pulled from elsewhere in the site, but are not duplicates of each other. Would a canonical tag be suitable here? Many Thanks
Technical SEO | | .egg0 -
Does all in one seo pack still have a rel canonical issue?
Hi All, I know that the all in one had errors in its rel canonical links on Wordpress but I wondered if this has been fixed. I get mixed info on the web. Anyone know for sure? Thanks!
Technical SEO | | xvpn9020 -
Why Canonical error?
I just got my SEOMOZ run and it says I have a CANONICAL ERROR: Scorpio Earrings - 7mm Stud - Sterling Silver http://www.astrojewelry.com/jewelry/scorpio-the-scorpion-earrings-30502.htm I'm not sure why--I only changed the <title>tag--not the URL.</span></p> <p><span class="truncated sub-url" title="http://www.astrojewelry.com/jewelry/scorpio-the-scorpion-earrings-30502.htm">Why would this generate a canonical error?</span></p> <p><span class="truncated sub-url" title="http://www.astrojewelry.com/jewelry/scorpio-the-scorpion-earrings-30502.htm">Kathleen</span></p> <p><span class="truncated sub-url" title="http://www.astrojewelry.com/jewelry/scorpio-the-scorpion-earrings-30502.htm">astrojewelry.com</span></p> <p> </p> <p> </p></title>
Technical SEO | | spkcp1110 -
Problem with Rel Canonical
Background: We check to make sure that IF you use canonical URL tags, it points to the right page. If the canonical tag points to a different URL, engines will not count this page as the reference resource and thus, it won't have an opportunity to rank. If you've not made this page the rel=canonical target, change the reference to this URL. NOTE: For pages not employing canonical URL tags, this factor does not apply. Clearly I am doing something wrong here, how do I check my various pages to see where the problem lies and how do I go about fixing it?
Technical SEO | | SallySerfas0 -
Rel = author display issue
I want to enter some products as blog posts. I don't want users to see the post info, but do want SE's to see rel="author". I can do this by setting display to "none" in a CSS style. The post info does not appear in the browser but is still in the page source. Will search engines be able to see the post info?
Technical SEO | | waynekolenchuk0 -
Does anyone see benefit in .com/en vs .com/uk for a UK site?
The client is already on /en and in my opinion there is not much to be gained by switching to /uk
Technical SEO | | Red_Mud_Rookie0 -
Appropriate Use of Rel Canonical
When using the On page report card I get a critical error on Rel Canonical Im not sure if I have understood this right but I think that my problem is that I own a Norwegian Domain name which is www.danske-båten.no This domain works great in norwegian, but I get problems with english (foreign) browsers. My english domain name is http://www.danske-båten.no. When you buy a domain name with the letter Å you get a non norwegian domain name as well. (dont quite get the tecnical aspect of it) Så when I publish a page (using wordpress if that means anything) I get this message: Appropriate Use of Rel Canonical Moderate fix <dl> <dt>Canonical URL</dt> <dd>"http://www.danske-båten.no/ferge-oslo-københavn/"</dd> <dt>Explanation</dt> <dd>If the canonical tag is pointing to a different URL, engines will not count this page as the reference resource and thus, it won't have an opportunity to rank. Make sure you're targeting the right page (if this isn't it, you can reset the target above) and then change the canonical tag to reference that URL.</dd> <dt>Recommendation</dt> <dd>We check to make sure that IF you use canonical URL tags, it points to the right page. If the canonical tag points to a different URL, engines will not count this page as the reference resource and thus, it won't have an opportunity to rank. If you've not made this page the rel=canonical target, change the reference to this URL. NOTE: For pages not employing canonical URL tags, this factor does not apply.</dd> <dd>So What to do to fix this?
Technical SEO | | stlastla
</dd> </dl>0