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
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? -
change this line from RewriteRule ^(.)$ http://www.domain.com/$1 [L,R=301] to RewriteRule ^(.)$ http://www.domain.com$1 [L,R=301]
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 tag not working
I have a weebly site and I put the canonical tag in the header code but the moz crawler still says that I'm missing the canonical tag. Any tips?
Technical SEO | | ctpolarbears0 -
Canonical vs 301 for index.php
Hello, we found recently quite a big error our index.php file had no canonical tag nor was a 301 redirect. So we put a canonical tag to it that it's the main www.examle.com duplicate . Now is there any difference in regards to link juice or Google 301 vs canonical tag ? I read that moz did a 301 from their index php. I understand one difference is that user then can Type in the URL if no 301, but I'm interested about ranking effect of it.
Technical SEO | | advertisingcloud0 -
Canonical in head best practice
Hi Is putting a list of canonical no follow links in the head the best practice? From SEO Moz analysis urls of duplicate content was flagged but now I have lots of cononicals in the head of my doc and the code looks untidy see head here : http://carpetflooringsdirect.com/ Is there a cleaner way of doing this? and how do I retest to see if I have fixed? Many thanks Matt
Technical SEO | | Matt-J0 -
Are my Canonical Links set up correctly?
I have Enable Canonical Links (recommended) on my web site. However, I also have THIS checked: Enable full URL for Home Page Canonical Link (include /default.asp) Is it hurting me??? Keep getting dinged on our report card. We are using the Volusion shopping cart software/platform.
Technical SEO | | GreenFarmParts0 -
How do I get google to index the right pages with the right key word?
Hello I notice that even though I have a site map google is indexing the wrong pages under the wrong key words. As a result its not as relevant and is not ranking properly.
Technical SEO | | ursalesguru0 -
Canonical tags pointing at old URLs that have been 301'd
I have a site which has various white label sites with the same content on each. I have canonical tags on the white label sites pointing to the main site. I have changed some URLs on the main site and 301'd the previous URL to the new ones. Is it ok to have the canonicals pointing to the old URLs that now have a 301 redirect on them.
Technical SEO | | BeattieGroup0 -
Should i use NoIndex, Follow & Rel=Canonical Tag In One Page?
I am having pagination problem with one of my clients site , So I am deciding to use noindex, follow tag for the Page 2,3,4 etc for not to have duplicated content issue, Because obviously SEOMoz Crawl Diagnostics showing me lot of duplicate page contents. And past 2 days i was in constant battle whether to use noindex, follow tag or rel=canonical tag for the Page 2,3,4 and after going through all the Q&A,None of them gives me crystal clear answer. So i thought "Why can't i use 2 of them together in one page"? Because I think (correct me if i am wrong) 1.noindex, follow is old and traditional way to battle with dup contents
Technical SEO | | DigitalJungle
2.rel=canonical is new way to battle with dup contents Reason to use 2 of them together is: Bot finds to the non-canonical page first and looks at the tag nofollow,index and he knows not to index that page,meantime he finds out that canonical url is something something according to the url given in the tag,NO? Help Please???0 -
Rel canonical with index follow on query string URLs
Hi guys, Quick question regarding the rel canonical tag. I have lots of links pointing at me with query strings and previously used some code to determine if query strings were in the URL and if they were then not to index that page. If there weren't query strings then the page would be indexed and followed. I assume I can now use the rel canonical tag on each of these pages so the value goes to the proper URL minus any query string. However do I need to have the rel canonical tag above the index, follow tag on the page? So URL is site.com/page.html?ref=ABC meta robots is "index, follow" Rel canonical is "site.com/page.html" Does the order of the meta robots and canonical tag matter? Thanks in advance!
Technical SEO | | panini0