Rel="canonical" and rewrite
-
Hi,
I'm going to describe a scenario on one of my sites, I was wondering if someone could tell me what is the correct use of rel="canonical" here.
Suppose I have a rewrite rule that has a rule like this:
RewriteRule ^Online-Games /main/index.php
So, in the index file, do I set the rel="canonical" to Online-Games or /main/index.php?
Thanks.
-
Great, thanks a lot!
-
Your example is not a case where you would use canonical links.
Canonical links are useful when you have several pages which are accessible vial individual URLs and do not redirect to a single page, yet they have very similar content.
A great example is a category page in an online store. Quite often, you will find various sorting methods, like price, popularity, etc. These various sorting methods usually add a parameter to the URL, something like "order=price". Yet, the content remains largely the same.
In cases such as above, the different pages should have a canonical reference to the main page.
In your case, you simply need a 301 redirect, that's all.
-
None of the above. If you have a .htaccess file, you need to 301 /main/index.php to OnlineGames. Another option is to tell index.php it can only be called as OnlineGames, or 301 to that directory. The reason is you're pretending that index.php is a directory. You don't want to waste the time of bots crawling the same page twice so just 301 it. You remove the issue entirely and save your crawl budget.
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
-
Use 301 or rel=canonical
I have a page on my site that is showing in search results at #9. I created another page on my site with the search term in the url. Wondering if I 301 or rel=canonical. Thank you, Kerry
Technical SEO | | Hydraulicgirl0 -
Redundant categorization - "boys" and "girls" category. Any other suggestions than implementing filtering?
One of our clients (a children's clothing company) has split their categories (outwear, tops, shoes) between boys and girls - There's one category page for girls outwear, and one category for boys outwear. I am suspecting that this redundant categorisation is diluting link juice and rankings for the related search queries. Important points: The clothes themselves are rather gender-neutral, girl's sweaters don't differ that much from the boy's sweaters. Our keyword research indicates that norwegians' search queries are also pretty gender neutral - people are generally searching after "children's dresses", "shoes for kids", "snowsuits", etc. So these gender specific categories are not really reflective of people's search behavior. I acknowledge that implementing a filter for "boys" and "girls" would be the best way to solve this redundant categorization, but that would simply be to expensive for our client. I'm thinking that some sort of canonicalisation would be the best approach to solve this issue. Are there any other suggestions or comments to this?
Technical SEO | | Inevo0 -
Webmaster Tools "Links to your site" history over time?
Is there a way to see a history of the "links to your site"? I've seen a lot of posts here from people say "I just saw a big drop in my numbers." I don't look at this number enough to be that familiar with it. Is there a way to see if Google has suddenly chopped our numbers? I've poked around a little, but not found a method yet. Thanks, Reeves
Technical SEO | | wreevesc0 -
Rel Canonical question
Hi: I got a report indication 17 rel canonical notices. What does this mean in simple language and how do i go about fixing things?
Technical SEO | | Shaaps0 -
Duplicate content with "no results found" search result pages
We have a motorcycle classifieds section that lets users search for motorcycles for sale using various drop down menus to pick year-make-type-model-trim, etc.. These search results create urls such as:
Technical SEO | | seoninjaz
www.example.com/classifieds/search.php?vehicle_manufacturer=Triumph&vehicle_category=On-Off Road&vehicle_model=Tiger&vehicle_trim=800 XC ABS We understand that all of these URL varieties are considered unique URLs by Google. The issue is that we are getting duplicate content errors on the pages that have no results as they have no content to distinguish themselves from each other. A URL like:
www.example.com/classifieds/search.php?vehicle_manufacturer=Triumph&vehicle_category=Sportbike
and
www.example.com/classifieds/search.php?vehicle_manufacturer=Honda&vehicle_category=Streetbike Will have a results page that says "0 results found". I'm wondering how we can distinguish these "unique" pages better? Some thoughts:
-make sure <title>reflects what was search<br />-add a heading that may say "0 results found for Triumph On-Off Road Tiger 800 XC ABS"<br /><br />Can anyone please help out and lend some ideas in solving this? <br /><br />Thank you.</p></title>0 -
Duplicate Page Titles Warnings, htaccess Rewrite & Canonical Links.
Hey guys, Just signed up for a pro account and I am getting Duplicate Page Title warnings on links that are duplicate, rewritten for SEO, but have a canonical href tag. I have two sets of links in my store: SEO friendly: http://www.mysite.com/item/iphone-case Operational link: http://www.mysite.com/shop/product.php?pid=11 This operational link however has a href canonical tag pointing to the SEO friendly link as being the primary link. My question is; Do I need to worry about this Duplicate Page Title Warning if I am using a canonical tag on the Operational link pointing to the SEO friendly link? Thanks!
Technical SEO | | jason3600 -
How important is meta content="" name="title"?
How much meta content="" name="title" impacts rankings? I have right now:
Technical SEO | | tonis
<title>Keyword</title> So my question is, that does this Keyword 2, so called meta title have any impact on rankings?0