Canonical solution for query strings?
-
Greetings,
The Hotel company where I'm employed uses query strings in it's url's to track customers.
The query strings are integrated into our property management system, and they help identify who we need to pay commissions to, so they aren't going anywhere.
While I understand that session variables could have been a better solution, I sort of inherited this problem.
The issue I'm running into is that my Webmaster tools picks up these query strings as actual url's.
So for instance: www.url.com/index.php?P_SOURCE=WBFQ
Seems like a duplicate page of my root, and like wise for all my other pages that use our booking widget.
So, Is there a canonical solution to this issue? or would 301/302's be the only solution.
Also, we may have 10 different but specific query strings to put into our urls. Would the 301/302 approach cause any server issues for say 10 pages? So 10 pages x 10 access codes = a lot of redirects.
Thanks in advance,
Cyril
-
Short answer Yes.( as long as you have rel Canonical them back to the original page ). Google will drop the other pages over time
Things you can do here :
- Make sure your sitemap is not listing these extra urls
Thing I recommend you DONT do
- noIndex the dynamic pages - adding a noindex could tell google not to index those pages, but some one could link back to that page with P_SOURCE=WBFQ and the main page gets no benefit from that
- ask for manual removal ( because google does not like it when we ask them To get the right "version" of your site indexedhttp://support.google.com/webmasters/bin/answer.py?hl=en&answer=1269119 )
Hope that answers you questions
-
Sweet! Glad to know I can eliminate an option.
I'll ask you the same thing I asked Thomas, will the query'd urls eventually drop off once google decides which version is best?
Thanks Saijo
-
Hi Nola504
301 redirect is certainly NOT your solution .. if you 301 redirect www.url.com/index.php?P_SOURCE=WBFQ to your homepage , that is the page visitors will be redirected to ( the ?P_SOURCE=WBFQ will be stripped off , I dont think that is what you want )
Rel canonical will tell Google , thay are all the same page with the same content and it will only show the main url that you nominate as the Canonical url ( in most cases , I have read about some study which claims at times google might decide for itself which is the better page )
Moreinfo http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394
-
Thanks for the info Thomas,
I only added the canonical tag about a month ago, do you think over time those query links will eventually die off?
-
Adding in the canonical tag for each page should solve this problem. We use query strings as well for tracking sources and referrers. Canonicals are a solid solution for what you described.
But the fact that Google is finding that URL is another problem. If Google continues to find the URL after your canonical insertion then you may want to 301 redirect that particular string.
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
-
Does using a canonical with ?utm_source=gmb cause any issues?
All of our URLs in Google My Business are tagged with ?utm_source=gmb. This way when people click on it within a Google Map listing, knowledge graph, etc we know it came from there. I'm assuming using a canonical on all ?_utm_source _pages (we have others, including some in the index) won't cause any problems with this, correct? Since they're not technically traditional organic SERPs? Dumb question I know, but better safe than sorry. Thanks.
Technical SEO | | Alces1 -
Google Search Console and User-declared canonical is actually Hreflang tag
Hey, We recently launched a US version of UK based ecommerce website on the us.example.com subdomain. Both websites are on Shopify so canonical tags are handled automatically and we have implemented Hreflang tags across both websites. Suddenly our rankings in the UK have dropped and after looking in search console for the UK site ive found that a lot of pages are now no longer indexed in Google because the User-declared canonical is the Hreflang tag for the US URL. Below is an example https://www.example.com/products/pac-man-arcade-cabinet - is the product page is the canonical tag rel="alternate" href="https://www.example.com/products/pac-man-arcade-cabinet" hreflang="en-gb" /> - UK hreflang tag rel="alternate" href="https://us.example.com/products/pac-man-arcade-cabinet" hreflang="en-us" /> - US Hreflang tag then in Google search console the user-defined canonical is https://us.example.com/products/pac-man-arcade-cabinet but it should be https://www.example.com/products/pac-man-arcade-cabinet The UK website has been assigned to target the United Kingdom in Search Console and the US website has been assigned to target the United States. We also do not have access to robots.txt file unfortunately. Any help or insight would be greatly appreciated.
Technical SEO | | PeterRubber0 -
Duplicate content and rel canonicals?
Hi. I have a question relating to 2 sites that I manage with regards to duplicate content. These are 2 separate companies but the content is off a data base from the one(in other words the same). In terms of the rel canonical, how would we do this so that google does not penalise either site but can also have the content to crawl for both or is this just a dream?
Technical SEO | | ProsperoDigital0 -
No indexing url including query string with Robots txt
Dear all, how can I block url/pages with query strings like page.html?dir=asc&order=name with robots txt? Thanks!
Technical SEO | | HMK-NL0 -
Htaccess query
I'm currently working on a live version of a clients website which has duplication issues. With .htaccess, I need to rewrite URL's of the following format: vacancy.php?id=802 to vacancy/?id=802 I tried adding the following line but it returned a 500, and don't want to keep taking the site out. RewriteRule ^vacancy/?id=([0-9]+)$ vacancy.php?id=$1 [R=301, L]
Technical SEO | | AndrewAkesson0 -
E-commerce solution and subdomain issues
Hello All,
Technical SEO | | CherieP
In light of Wil Reynold's closing keynote at Portland's Searchfest, I thought I might try posting here to get some advice. We run a family business on the side and we're looking at starting to use volusion.com for our e-commerce solution. The catch is we currently have a wordpress site summitmining.com running on thesis with great SEO. Ranking #1 & #2 for our highest trafficked terms. Ideally, I'd like Summitmining.com to direct to the Volusion store and then summitmining.com/blog to go to our wordpress installation BUT since the volusion site will be hosted with the company and they will not host our wordpress installation we'd have to use a subdomain instead of a subdirectory which I understand will be bad for SEO. Does anyone have any recommendation on how to set this up without totally screwing up our ranking OR any recommendations of an easy to use shopping cart (I've worked on a magento site before and it's too complex for us) that wouldn't require a separate or subdomain? Thank you so much!
-Cherie Prochaska
503-816-3557
cherie@c-squaredassociates.com
@cherieprochaska0 -
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.
Technical SEO | | webtarget0 -
Rel=Canonical to Rewrite or original URL?
Working with a large number of duplicate pages due to different views of products. Rewriting URLs for the most linked page. Should rel=canonical point to the rewritten URL or the actual URL? Is there a way to see what the rewritten URL is within the crawl data? I was taking the approach of rewriting only the base version of each page and then using a rel=canonical on the duplicate pages. Can anyone recommend a better or cleaner approach? Haven't seen too many articles on retail SEO when faced with a less than optimized CMS. Thanks!
Technical SEO | | AmsiveDigital0