Canonicalization issue I cant work out
-
Seo Moz have kindly brought to my attention some canonicalization issues with my site.
Firstly I've adjust http://capitalalist.com to 301 redirect to http://www.capitalalist.com via htaccess.
But the crawl has shown for every page in my site the problem below:
http://www.capitalalist.com/cirque-du-soir
http://www.capitalalist.com/cirque-du-soir/
It's just that last / that's causing the problem. But I can't seem to see anyone having the same issue before.
BTW im using wordpress if that makes a difference.
Can anyone elaborate on the issue? How would i adjust my htaccess file to redirect a request with a / on the end of it?
Thanks in advance!
-
Thanks Jassy.
Exactly what i was looking for.
Good stuff!
-
Hi Paul, try something like this, but there are many variations of these on the web.
Posted this just as the yoast post was coming on.
#add trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)([^/])$ http://www.capitalist.com/$1$2/ [R=301,L]add www for non www pages
RewriteCond %{HTTP_HOST} ^capitalist.com$ [NC]
RewriteRule ^(.*)$ http://www.capitalist.com/$1 [L,R=301] -
The good folks at Yoast created a Wordpress plugin to deal with this very issue:
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 can i solve this redirect chain issue?
Hey, can somebody explain to me how can I solve this redirect chain issue? I tried redirecting /contact-us directly to **/contact/ **but this causes a chain of redirects of infinite dimensions. I don't know how to find the old redirect and delete it. Is there such an option? Thank you! byA7l
Intermediate & Advanced SEO | | Popos1 -
Redirect issue launching duplicate product categories on another TLD
Dear Mozzerz We run this e-commerce website (superstar.dk) where we are selling all different kinds of wristwatches from different brand names (Casio, Garmin, Suunto etc). We just bought another website selling watches (xxx.com) and therefore we would like to move some of the content from superstar.dk to the new website xxx.com, making superstar.dk into a more niche website. So we are basically taking a brand with all the products in it and shutting it down on superstar.dk and instead launching it on xxx.com. Superstar.dk will still be running, just with a more niche product- and brand selection. So my question is, should we redirect all the old product categories that we are shutting down to the new website on another TLD where we are opening them again and the same for the products (e.g. superstar.dk/garmin -> xxx.com/garmin)? Or would it be better to keep the redirects within the same website/TLD (e.g. superstar.dk/garmin -> superstar.dk)? A few examples:
Intermediate & Advanced SEO | | superstardenmark
superstar.dk/garmin -> xxx.com/garmin
superstar.dk/suunto -> xxx.com/suunto
etc..
superstar.dk/product1 -> xxx.com/product1
superstar.dk/product2 -> xxx.com/product2
etc.0 -
Duplicate content issue - online retail site.
Hello Mozzers, just looked at a website and just about every product page (there are hundreds - yikes!) is duplicated like this at end of each url (see below). Surely this is a serious case of duplicate content? Any idea why a web developer would do this? Thanks in advance! Luke prod=company-081
Intermediate & Advanced SEO | | McTaggart
prod=company-081&cat=20 -
Hey guys i have this issues on my crawling report what should i do to exlude the pages? are d
Overly-Dynamic URL Overly-Dynamic URL Although search engines can crawl dynamic URLs, search engine representatives have warned against using over 2 parameters in a given URL. Search engines may also see dynamic versions of the same URL as unique URLs, creating duplicate content.
Intermediate & Advanced SEO | | adulter0 -
Resource Links Still Working for People?
We've been using an outreach method that targets resource links & improvements seem to be minor, even though links are coming from .edu's and .gov's -- has anyone else noticed this trend? Guest posting seems to work much better in terms of ranking / traffic improvements.
Intermediate & Advanced SEO | | nicole.healthline0 -
Multiple URL's exist for the same page, canonicaliazation issue?
All of the following URL's take me to the same page on my site: 1. www.mysite.com/category1/subcategory.aspx 2. www.mysite.com/subcategory.aspx 3. www.mysite.com/category1/category1/category1/subcategory.aspx All of those pages are canonicalized to #1, so is that okay? I was told the following my a company trying to make our sitemap: "the site's platform dynamically creates URLs that resolve as 200 and should be 404. This is a huge spider trap for any search engine and will make them wary of crawling the site." What would I need to do to fix this? Thanks!
Intermediate & Advanced SEO | | pbhatt0 -
Do Nofollows still work for Sculpting?
Before answering this, let me explain my goals. I know that Google made a change a couple years ago that discounts the amount of Page Rank passed to dofollow links when there is a nofollow link present on the page. My goal is to keep the most page rank possible on my home page and pass a specified amount of Page Rank to 7 out of 10 of the pages linked to from my home page. I realize that creating 3 of the outgoing links as no follow links is not going to increase the Page Rank being sent to the other 7 pages. My question is will my home page be able to retain the Page Rank that would have been used by the three nofollow links or is that Page Rank value just lost when I implement a nofollow?
Intermediate & Advanced SEO | | MyNet0 -
How to resolve Duplicate Page Content issue for root domain & index.html?
SEOMoz returns a Duplicate Page Content error for a website's index page, with both domain.com and domain.com/index.html isted seperately. We had a rewrite in the htacess file, but for some reason this has not had an impact and we have since removed it. What's the best way (in an HTML website) to ensure all index.html links are automatically redirected to the root domain and these aren't seen as two separate pages?
Intermediate & Advanced SEO | | ContentWriterMicky0