Canonicalization issue? - URLs with and without trailing slashes showing up as unique
-
For some reason, our urls are set to change from “www.apprenda.com/ANYTHING" to “apprenda.com/ANYTHING”
These register as different pages though? We have rankings in SEOMoz Pro for terms where our homepage shows up 6th on google, but SEOMoz says it's not on the first page because it's checking against apprenda.com and not www.apprenda.com
Also, it seems like for some reason pages with trailing slashes also register differently than those without. Should we be doing something for that? Something to make sure all pages get rewritten to having the trailing slash or not?
For instance, this url: http://apprenda.com/saasgrid/features/multi-tenancy/ and this url” http://apprenda.com/saasgrid/features/multi-tenancy are really the same page. Yet in our analytics, they register as different pages with their own stats, etc.
What should we do in our particular case, and how can we get this fixed?
I really appreciate the help, and thanks in advance!
- Jesse
-
Here's a good post (here at SEOmoz) about the rel=canonical tag: http://www.seomoz.org/blog/complete-guide-to-rel-canonical-how-to-and-why-not
Here is a good resource for 301 redirects in other languages: http://www.webconfs.com/how-to-redirect-a-webpage.php
I don't have much experience with .NET but it looks like there are two ways to accomplish it. 1) Make changes to IIS to create the permanent redirect, 2) create server side code (maybe you have to check what URL is being requested and redirect them to the correct format?). You should be able to use REGEX like is displayed in my original post to accomplish this in .NET.
I would say the change directly in IIS, if you have access, is the way to go.
Jared
-
Awesome, thanks Jared! Our site is .NET based, but I believe their is a standard "index.aspx". Would this still apply?
Also, you mentioned that this, AS WELL AS utilizing canonical tags should take care of this. How should we go about utilizing canonical tags for our site?
Thanks again!
- Jesse
-
You should utilize htaccess 301 permanent redirects to force trailing slashes and www. to your URLs (or vice versa). This way you will let Google and other search engines know the correct way to be displaying your URLs. Anything pointing to your domain that doesn't fit that will be redirected to the proper format. This, as well as utilizing canonical tags, should take care of your duplicate content issue.
I'm assuming you have an index.php for your website but modify this and test as needed.
Externally redirect to add missing trailing slash to URLs with no filetype
RewriteCond $1 !(.[a-z0-9]{1,5}|/)$ [NC]
RewriteRule ^(.*)$ http://www.mywebsite.com/$1/ [R=301,L]Externally redirect non-blank non-canonical hostname request to canonical hostname
(if not already done by the above rule)
RewriteCond %{HTTP_HOST} !^(www.mysite.com)?$
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]Rewrite all requests which do not resolve to existing files to the CMS script, except
for image, css, and JS file requests, none of which need to be handled by the CMS,
and requests for index.php itself (to avoid a wasteful second-pass exists check).
RewriteCond $1 !(^index.php|.(gif|jpe?g|png|css|js))$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]Make sure you test this out before going live but it should work for what you need.
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
-
Why a certain URL ( a category URL ) disappears?
the page hasn't been spammed. - links are natural - onpage grader is perfect - there are useful high ranking articles linking to the page...pretty much everything is okay.....also all of my websites pages are okay and none of them has disappeared only this one ( the most important category of my site. )
Intermediate & Advanced SEO | | mohamadalieskandariii0 -
When I crawl my website I have urls with (#!162738372878) at the end of my urls
When I crawl my website I have urls with (#!162738372878) at the end of my urls. I used screaming frog to look check my website and I seen these. My normal urls are in there too, but each of them have a copy with this strange symbol and number at the end. I used a website builder called homestead to make the website and I seen a bunch of there urls in my crawl as well - http://editor.homestead.com/faq is an example I recently created a new website with their new website builder and transferred it to my old domain. However, I didnt know they didnt offer 301 redirects or canonical tags(learned about those afterwards) and I changed my page names. So they recommended I leave the old website published along with the new website. So if I search my website name on google, sometimes both will show in the results. I just want to sort this all out somehow. My website is www.coastlinetvinstalls.com Any feedback is greatly appreciated. Thanks, Matt
Intermediate & Advanced SEO | | Matt160 -
URL Structure Question
Am starting to work with a new site that has a domain name contrived to help it with a certain kind of long tail search. Just for fictional example sake, let's call it WhatAreTheBestRestaurantsIn.com. The idea is that people might do searches for "what are the best restaurants in seattle" and over time they would make some organic search progress. Again, fictional top level domain example, but the real thing is just like that and designed to be cities in all states. Here's the question, if you were targeting searches like the above and had that domain to work with, would you go with... whatarethebestrestaurantsin.com/seattle-washington whatarethebestrestaurantsin.com/washington/seattle whatarethebestrestaurantsin.com/wa/seattle whatarethebestrestaurantsin.com/what-are-the-best-restaurants-in-seattle-wa ... or what and why? Separate question (still need the above answered), would you rather go with a super short (4 letter), but meaningless domain name, and stick the longtail part after that? I doubt I can win the argument the new domain name, so still need the first question answered. The good news is it's pretty good content. Thanks... Darcy
Intermediate & Advanced SEO | | 945010 -
Can you nofollow a URL?
Hey Moz Community, My questions sounds pretty simple but unfortunately, it isn't. I have a domain name (we'll use example.com for this) http://example.com which 301 re-directs to http://www.example.com. http://example.com has bad links pointing to it and http://www.example.com does not. So essentially, I want to stop negative influences from http://example.com being passed on to http://www.example.com. A 302 re-direct sounds like it would work in theory but is this the best way to go about this? Just so you know, we have completed a reconsideration request a long time ago but I think the bad links are still negatively affecting the website as it does not rank for it's own name which is bizarre. Actual Question: How do I re-direct http://example.com to http://www.example.com without passing on the negative SEO attached to http://example.com? Thanks in advance!
Intermediate & Advanced SEO | | RiceMedia0 -
Capitals in URLs
Hello Mozzers. I've just been looking at a site with capitals in the URL - capitals are used in the product descriptions, so you'll have a URL structure like this: www.company.com/directory1/Double-Beds-Luxury (such URLs do not work if I lower the case of the capitals). There are 50,000 such products on the site. Clearly one drawback is potential customers might type in, or link to, the lower case of the URL and get a "not found" result (though the urls are relatively long so not that likely I'm thinking). Are there any additional drawbacks with the use of capitals outlined here?
Intermediate & Advanced SEO | | McTaggart0 -
Index, Nofollow Issue
We are having on our site a couple of pages that we want the page to be indexed, however, we don't want the links on the page to be followed. For example url: http://www.printez.com/animal-personal-checks.html. We have added in our code: . Bing Webmaster Tools, is telling us the following: The pages uses a meta robots tag. Review the value of the tag to see if you are not unintentionally blocking the page from being indexed (NOINDEX). Question is, is the page using the right code as of now or do we need to do any changes in the code, if so, what should we use for them to index the page, but not to follow the links on the page? Please advise, Morris
Intermediate & Advanced SEO | | PrintEZ0 -
Is it OK to have a site that has some URLs with hyphens and other, older, legacy URLs that use underscores?
I'm working with a VERY large site that has recently been redesigned/recategorized. They kept only about 20% of the URLs from the legacy site, the URLs that had revenue tied to them, and these URLs use underscores. Whereas the new URLs created for the site use hyphens. I don't think that this would be an issue for Google, as long as the pages are of quality, but I wanted to get everyone's opinion on this. Will it hurt me to have two different sets of URLs, those with using hyphens and those using underscores?
Intermediate & Advanced SEO | | Business.com0 -
Limiting URLS in the HTML Sitemap?
So I started making a sitemap for our new golf site, which has quite a few "low level" pages (about 100 for the golf courses that exist in the area, and then about 50 for course architects), etc etc. My question/open discussion is simple. In a sitemap that already has about 50 links, should we include these other low level 150 links? Of course, the link to the "Golf Courses" is there, along with a link to the "Course Architects" MAIN pages (which, subdivides on THOSE pages.) I have read the limit is around 150 links on the sitemap.html page and while it would be nice to rank long tail for the Golf Courses. All in all, our site architecture itself is easily crawlable as well. So the main question is just to include ALL the links or just the main ones? Thoughts?
Intermediate & Advanced SEO | | JamesO0