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
-
Canonical error from Google
Moz couldn't explain this properly and I don't understand how to fix it. Google emailed this morning saying "Alternate page with proper canonical tag." Moz also kinda complains about the main URL and the main URL/index.html being duplicate. Of course they are. The main URL doesn't work without the index.html page. What am I missing? How can I fix this to eliminate this duplicate problem which to me isn't a problem?
Technical SEO | | RVForce0 -
Product Variations (rel=canonical or 301) & Duplicate Product Descriptions
Hi All, Hoping for a bit of advice here please, I’ve been tasked with building an e-commerce store and all is going well so far. We decided to use Wordpress with Woocommerce as our shop plugin. I’ve been testing the CSV import option for uploading all our products and I’m a little concerned on two fronts: - Product Variations Duplicate content within the product descriptions **Product Variations: - ** We are selling furniture that has multiple variations (see list below) and as a result it creates c.50 product variations all with their own URL’s. Facing = Left, Right Leg style = Round, Straight, Queen Ann Leg colour = Black, White, Brown, Wood Matching cushion = Yes, No So my question is should I 301 re-direct the variation URL’s to the main product URL as from a user perspective they aren't used (we don't have images for each variation that would trigger the URL change, simply drop down options for the user to select the variation options) or should I add the rel canonical tag to each variation pointing back to the main product URL. **Duplicate Content: - ** We will be selling similar products e.g. A chair which comes in different fabrics and finishes, but is basically the same product. Most, if not all of the ‘long’ product descriptions are identical with only the ‘short’ product descriptions being unique. The ‘long’ product descriptions contain all the manufacturing information, leg option/colour information, graphics, dimensions, weight etc etc. I’m concerned that by having 300+ products all with identical ‘long’ descriptions its going to be seen negatively by google and effect the sites SEO. My question is will this be viewed as duplicate content? If so, are there any best practices I should be following for handling this, other than writing completely unique descriptions for each product, which would be extremely difficult given its basically the same products re-hashed. Many thanks in advance for any advice.
Technical SEO | | Jon-S0 -
When/where is it better to NOFOLLOW
Hello, I have been away from SEO for a while and boy, how things changed... I have a question/concern about implementing nofollows... Should I nofollow repeated internal links?
Technical SEO | | WIDE16
Should I nofollow internal links at all?
What if a page has too many internal links between top navigation with drop down menus, left column and footer links? OR Should I only use nofollows for outbound links? I am pretty confused and would love some clarification... Thank you very much, Koki0 -
Canonical needed after no index
Hi do you need to point canonical from a subpage to main page if you have already marked a no index on the subpage, like when google is not indexing it so do we need canonicals now as is it passing any juice?
Technical SEO | | razasaeed0 -
Am I Doing this Canonical Right?
Hi,I admit to new to the Mod Rewrite.Here is my mod rewrite in my .htaccess# Begin non-www page protection # <ifmodule mod_rewrite.c="">RewriteEngine On
Technical SEO | | Force7
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]</ifmodule> # End non-www page protection #If I have my home page set toI really want the canonical to be www.domain.com no trailing slashDid I create a confllict, and if so, how should I change it?0 -
Rel=cannonical + 301 redirect
Hi All I am currently working on a DotNetNuke site. I have enabled friendly URL's which have changed the url structure from the default setting of TabId=x to whatever the page name is set as. I will use the following page as an example - www.notarealdomain./graphicdesign.aspx Now I would like to know if it would be worth my time to change this to "/graphic-design.aspx through the use of a 301 redirect and/or a rel=can. Any help would be much appreciated. Thanks
Technical SEO | | masterpete0 -
Will rel=canonical cause a page to be indexed?
Say I have 2 pages with duplicate content: One of them is: http://www.originalsite.com/originalpage This page is the one I want to be indexed on google (domain rank already built, etc.) http://www.originalpage.com is more of an ease of use domain, primarily for printed material. If both of these sites are identical, will rel=canonical pointing to "http://www.originalsite.com/originalpage" cause it to be indexed? I do not plan on having any links on my site going to "http://www.originalsite.com/originalpage", they would instead go to "http://www.originalpage.com".
Technical SEO | | jgower0 -
.Rel=author
For the purpose of implementing rel=author, 1. Whether http://www.ultraseo.com/blogs/ is my "Author page" 2. Where should i link from my Google profile to website http://www.ultraseo.com/ I mean, in which tab or section in Google profile should i link back to website ?
Technical SEO | | seoug_20050