The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Canonical solution for query strings?

    Canonical solution for query strings?

    Technical SEO Issues
    6 3 2.4k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Nola504
      Nola504 last edited by

      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

      1 Reply Last reply Reply Quote 0
      • Thos003
        Thos003 last edited by

        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.

        Nola504 1 Reply Last reply Reply Quote 0
        • Nola504
          Nola504 @Thos003 last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • Saijo.George
            Saijo.George last edited by

            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

            Nola504 1 Reply Last reply Reply Quote 1
            • Nola504
              Nola504 @Saijo.George last edited by

              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

              Saijo.George 1 Reply Last reply Reply Quote 0
              • Saijo.George
                Saijo.George @Nola504 last edited by

                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

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                • Query string parameters always bad for SEO?
                  Martijn_Scheijbeler
                  Martijn_Scheijbeler
                  0
                  7
                  7.4k

                • Duplicate Content .ASP with Query Strings
                  MichaelC-15022
                  MichaelC-15022
                  0
                  5
                  185

                • How to Remove Old Comment Page Query String URLs
                  jonmifsud
                  jonmifsud
                  0
                  2
                  151

                • Is rel=canonical needed for URLs with Google Analytics query strings?
                  ThompsonPaul
                  ThompsonPaul
                  0
                  4
                  1.9k

                • Should I block robots from URLs containing query strings?
                  ShearingsGroup
                  ShearingsGroup
                  0
                  4
                  681

                • Query strings in Canoncials URLs
                  irvingw
                  irvingw
                  0
                  4
                  373

                • Query string in url - duplicate content?
                  rhutchings
                  rhutchings
                  0
                  6
                  4.9k

                • Rel canonical with index follow on query string URLs
                  panini
                  panini
                  0
                  4
                  1.4k

                Get started with Moz Pro!

                Unlock the power of advanced SEO tools and data-driven insights.

                Start my free trial
                Products
                • Moz Pro
                • Moz Local
                • Moz API
                • Moz Data
                • STAT
                • Product Updates
                Moz Solutions
                • SMB Solutions
                • Agency Solutions
                • Enterprise Solutions
                • Digital Marketers
                Free SEO Tools
                • Domain Authority Checker
                • Link Explorer
                • Keyword Explorer
                • Competitive Research
                • Brand Authority Checker
                • Local Citation Checker
                • MozBar Extension
                • MozCast
                Resources
                • Blog
                • SEO Learning Center
                • Help Hub
                • Beginner's Guide to SEO
                • How-to Guides
                • Moz Academy
                • API Docs
                About Moz
                • About
                • Team
                • Careers
                • Contact
                Why Moz
                • Case Studies
                • Testimonials
                Get Involved
                • Become an Affiliate
                • MozCon
                • Webinars
                • Practical Marketer Series
                • MozPod
                Connect with us

                Contact the Help team

                Join our newsletter
                Moz logo
                © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                • Accessibility
                • Terms of Use
                • Privacy