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. On-Page / Site Optimization
    4. Should I block google indexing "search.php"

    Should I block google indexing "search.php"

    On-Page / Site Optimization
    4 3 185
    • 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.
    • McCaldin
      McCaldin last edited by

      My question is I have a search page on our website , you can search by date, number of people staying and so on, I am just wondering should block this in the robots.txt ? Because we have pretty URL'S already for searching by county and searching by towns.  I cannot see any benefit of having  e.g

      "search/search.php?sp_dateFrom=16%2F12%2F2015&sp_dateTo=23%2F12%2F2015&sec_drop%5B%5D=727&spesh_town_id=764&q=&occupants=5&bedrooms=3&submit=SEARCH#search"   indexed.  Would I be correct in doing this ?

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

        You want to block Google from any URL that produces a search result that is essentially a resorting or refiltering of a master list of search results that they have already crawled/indexed.

        If you already have a set of pages that lets Google crawl all the pages in your site (could be all the products in your store, all the articles in your blog, etc), having Google crawl through variants of that same page causes a couple of problems.  1) You are wasting Google's time in spidering pages that it has already seen, vs having Google crawl your more important pages.  Depending on how you have these setup, you may end up sending Google into an endless loop of non-important pages to crawl 2) You are creating pages that are generally low quality, have nothing truly original on them, they will not rank for anything anyway and may give the impression that your site consists of primarily low quality pages.

        What I show Google is a single simple path to browse my content.  For a blog this would be a chronological listing of articles that is paginated so that Google and the user can browse from my most recent to my oldest articles.  For an ecommerce page, I might setup basic category pages, make sure the category pages have great content on them and then allow Google to crawl back through all the products based on those main category pages.   If I have some products in 2 or 3 categories I do not sweat it.    If on either of these examples, I show the user options to resort, filter, etc the results, I block Google with a nofollow or with robots.txt.

        In your example, you already have "pretty" URLs by country and town, keep those, that will let Google and your users find your content and also provide context around that content.    The crazy a$$ search URL you show is handy for your PHP code to give a search result, but would just waste Google's time.   Unless you think it would be useful for a user to save the search URL results, I would see if there is a way to simply hide all the parameters from the user (submit the parameters using a POST vs a GET request for example) so that all they see in the URL result is /search/search.php

        Good luck!

        1 Reply Last reply Reply Quote 2
        • McCaldin
          McCaldin last edited by

          That is the answer I was looking for, I was thinking along those lines.  The problem was that Seo software was coming up with duplicate content because of different variations of the search parameters.  Thanks very much for a clear and precise answer and taking time to explain this.

          Martijn_Scheijbeler 1 Reply Last reply Reply Quote 0
          • Martijn_Scheijbeler
            Martijn_Scheijbeler @McCaldin last edited by

            Second confirmation ;-), he's right. It's one of the things that for bigger sites really could get you in trouble.

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            • My Website is Indexed But Not Showing Up in Google's Search Results
              Andy.Drinkwater
              Andy.Drinkwater
              0
              5
              4.8k

            • Should I "No Index" Certain Pages On My Site?
              KyleEaves
              KyleEaves
              0
              5
              223

            • What does Google consider a "Duplicate Title Tag?"
              webmethod
              webmethod
              0
              4
              6.2k

            • Difference between "And" and(!) "-"
              rrad
              rrad
              0
              3
              246

            • Does Google pick up on words such as "in", "the", "and" etc?
              Dr-Pete
              Dr-Pete
              0
              4
              577

            • ON SITE SEARCH INDEXED BY GOOGLE - no follow or no index
              ShaMenz
              ShaMenz
              0
              4
              770

            • How to make google not index quotes from other sites?
              StefanJDorresteijn
              StefanJDorresteijn
              0
              6
              724

            • Google indexing Internal Search Results
              wissamdandan
              wissamdandan
              0
              2
              1.7k

            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