undefined
Skip to content
Moz logo Menu open Menu close
  • Products
    • Moz Pro
    • Moz Pro Home
    • Moz Local
    • Moz Local Home
    • STAT
    • Moz API
    • Moz API Home
    • Compare SEO Products
    • Moz Data
  • Free SEO Tools
    • Domain Analysis
    • Keyword Explorer
    • Link Explorer
    • Competitive Research
    • MozBar
    • More Free SEO Tools
  • Learn SEO
    • Beginner's Guide to SEO
    • SEO Learning Center
    • Moz Academy
    • SEO Q&A
    • Webinars, Whitepapers, & Guides
  • Blog
  • Why Moz
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • Case Studies
    • The Moz Story
    • New Releases
  • Log in
  • Log out
  • Products
    • Moz Pro

      Your all-in-one suite of SEO essentials.

    • Moz Local

      Raise your local SEO visibility with complete local SEO management.

    • STAT

      SERP tracking and analytics for enterprise SEO experts.

    • Moz API

      Power your SEO with our index of over 44 trillion links.

    • Compare SEO Products

      See which Moz SEO solution best meets your business needs.

    • Moz Data

      Power your SEO strategy & AI models with custom data solutions.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Free SEO Tools
    • Domain Analysis

      Get top competitive SEO metrics like DA, top pages and more.

    • Keyword Explorer

      Find traffic-driving keywords with our 1.25 billion+ keyword index.

    • Link Explorer

      Explore over 40 trillion links for powerful backlink data.

    • Competitive Research

      Uncover valuable insights on your organic search competitors.

    • MozBar

      See top SEO metrics for free as you browse the web.

    • More Free SEO Tools

      Explore all the free SEO tools Moz has to offer.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Learn SEO
    • Beginner's Guide to SEO

      The #1 most popular introduction to SEO, trusted by millions.

    • SEO Learning Center

      Broaden your knowledge with SEO resources for all skill levels.

    • On-Demand Webinars

      Learn modern SEO best practices from industry experts.

    • How-To Guides

      Step-by-step guides to search success from the authority on SEO.

    • Moz Academy

      Upskill and get certified with on-demand courses & certifications.

    • SEO Q&A

      Insights & discussions from an SEO community of 500,000+.

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • Small Business Solutions

      Uncover insights to make smarter marketing decisions in less time.

    • Agency Solutions

      Earn & keep valuable clients with unparalleled data & insights.

    • Enterprise Solutions

      Gain a competitive edge in the ever-changing world of search.

    • The Moz Story

      Moz was the first & remains the most trusted SEO company.

    • Case Studies

      Explore how Moz drives ROI with a proven track record of success.

    • New Releases

      Get the scoop on the latest and greatest from Moz.

    Surface actionable competitive intel
    New Feature

    Surface actionable competitive intel

    Learn More
  • Log in
    • Moz Pro
    • Moz Local
    • Moz Local Dashboard
    • Moz API
    • Moz API Dashboard
    • Moz Academy
  • Avatar
    • Moz Home
    • Notifications
    • Account & Billing
    • Manage Users
    • Community Profile
    • My Q&A
    • My Videos
    • Log Out

The Moz Q&A Forum

  • Forum
  • Questions
  • Users
  • Ask the Community

Welcome to the Q&A Forum

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

  1. Home
  2. SEO Tactics
  3. On-Page Optimization
  4. How to exclude URL filter searches in robots.txt

Moz Q&A is closed.

After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

How to exclude URL filter searches in robots.txt

On-Page Optimization
4
9
12.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • neenor
    neenor last edited by Sep 4, 2013, 12:35 PM

    When I look through my MOZ reports I can see it's included 'pages' which it shouldn't have included i.e. adding filtering rules such as this one http://www.mydomain.com/brands?color=364&manufacturer=505

    How can I exclude all of these filters in the robots.txt? I think it'll be:

    Disallow: /*?color=$

    Is that the correct syntax with the $ sign in it? Thanks!

    1 Reply Last reply Reply Quote 0
    • Everett
      Everett @swissmadesmt last edited by Jun 20, 2017, 5:00 PM Jun 20, 2017, 5:00 PM

      Unless you're specifically calling out Bing or Baidu... in your Robots.txt file they should follow the same directives as Google so testing with Google's Robots.txt file tester should suffice for all of them.

      1 Reply Last reply Reply Quote 0
      • topic:timeago_earlier,7 days
      • swissmadesmt
        swissmadesmt last edited by Jun 13, 2017, 9:54 AM Jun 13, 2017, 9:54 AM

        Yes, but what about bing and rest of Search Engine?

        Everett 1 Reply Last reply Jun 20, 2017, 5:00 PM Reply Quote 0
        • topic:timeago_earlier,4 years
        • Everett
          Everett @neenor last edited by Sep 5, 2013, 1:59 PM Sep 5, 2013, 1:59 PM

          Adrian,

          I agree that there certainly is a right answer to the question posted, as the question asks specifically about one way to manage the issue, being a block of filters in the robots.txt file. What I was getting at is that this may or may not necessarily be the "best" way, and that I'd need to look at your site and your unique situation to figure our which would be the best solution for your needs.

          It is very likely that with these parameters a robots.txt file block is the best approach, assuming the parameters aren't added by default into category page or category pagination page navigational links, as then it would affect the bot's ability to crawl the site. Also, if people are linking to those URLs (highly unlikely though) you may consider a robots meta noindex,follow tag instead so the pagerank could flow to other pages.

          And I'm not entirely sure the code you provided above will work if the blocked parameter is the first one in the string (e.g. domain.com/category/?color=red) as there is the additional wildcard between the ? and the parameter. I would advise testing this in Google Webmaster Tools first.

          1. On the Webmaster Tools Home page, click the site you want.
          2. Under Crawl, click Blocked URLs.
          3. If it's not already selected, click the Test robots.txt tab.
          4. Copy the content of your robots.txt file, and paste it into the first box.
          5. In the URLs box, list the site to test against.
          6. In the User-agents list, select the user-agents you want (e.g. Googlebot)
          1 Reply Last reply Reply Quote 0
          • neenor
            neenor @Everett last edited by Sep 5, 2013, 1:31 PM Sep 5, 2013, 1:31 PM

            There certainly is a right answer to my question - I already posted it here earlier today:

            Disallow: /*?color=
             Disallow: /
            ?*manufacturer=

            Without the $ at the end which would otherwise denote the end of the URL.

            Everett 1 Reply Last reply Sep 5, 2013, 1:59 PM Reply Quote -1
            • Everett
              Everett last edited by Sep 5, 2013, 12:52 PM Sep 5, 2013, 12:52 PM

              Hello Adrian,

              The Moz reports are meant to help you uncover issues like this. If you're seeing non-canonical URLs in the Moz report then there is a potential issue for Google, Bing and other search engines as well.

              Google does respect wildcards (*) in the robots.txt file, though it can easily be done wrong. There is not right or wrong answer to the issue of using filters or faceted navigation, as each circumstance is going to be different. However, I hope some of these articles will help you identify the best approach for your needs:

              (Note: Faceted Navigation is not exactly the same as category filters, but the issues and possible solutions are very similar

              )Building Faceted Navigation That Doesn't Suck Faceted Navigation Whiteboard Friday
              Duplicate Content: Block, Redirect or Canonical
              Guide to eCommerce Facets, Filters and Categories
              Rel Canonical How To and Why Not
              Moz.com Guide to Duplicate Content

              I don't know how your store handles these (e.g. does it add the filter automatically, or only when a user selects a filter?) so I can't give you the answer, but I promise if you read those articles above you will have a very good understanding of all of the options so you can choose which is best for you. That might end up being as simple as blocking the filters in your robots.txt file, or you may opt for rel canonical, noindex meta tag, ajax, Google parameter handling, etc...

              Good luck!

              neenor 1 Reply Last reply Sep 5, 2013, 1:31 PM Reply Quote 0
              • neenor
                neenor @stever999 last edited by Sep 5, 2013, 7:13 AM Sep 5, 2013, 7:13 AM

                It's not Google's index that I'm interested in in this case, it's for the MOZ reports. Moz was including over 10,000 'pages' because it was indexing these URLs. Now I know how to edit the robots.txt Moz will be prevented from indexing them again (we only have around 2,000 real pages, not 10,000)

                1 Reply Last reply Reply Quote 0
                • neenor
                  neenor last edited by Sep 5, 2013, 7:11 AM Sep 5, 2013, 7:11 AM

                  I sought out the answer from a developer and got the following reply, so posting here in case it helps someone else:

                  To exclude pages with color or manufacture in them you can use

                  Disallow: /*?color=
                   Disallow: /
                  ?*manufacturer=

                  A  question mark in your try should be omitted as it denotes the end of the url

                  1 Reply Last reply Reply Quote 0
                  • stever999
                    stever999 last edited by Sep 4, 2013, 5:39 PM Sep 4, 2013, 5:39 PM

                    Hi

                    I would recommend excluding these in Google Webmaster Tools. Once logged in to your account under the "Crawl" menu you will find "URL Parameters". Find the relevant parameter in the list on this page and you can tell Google not to index these pages.

                    Hope this helps.

                    Steve

                    neenor 1 Reply Last reply Sep 5, 2013, 7:13 AM Reply Quote 0
                    • 1 / 1
                    1 out of 9
                    • First post
                      1/9
                      Last post

                    Got a burning SEO question?

                    Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                    Start my free trial


                    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.

                    • See all categories

                    Related Questions

                    • maghanlinchpinsales

                      City Name in URL structure

                      I have a client whose site was built when they only served one market, and they now have that city in the majority of their URLs. I'm suggesting we redo the URL structure to remove this location from the main URLs (think homepage, about, etc.) since they have now expanded to three markets. They are seeing a lot of great organic traffic in that original market but are struggling in the new ones they've added so I'm helping to optimize their site. How critical do you think that removing that location from the URL is? I know we would need to implement 301 redirects, but wanted to get thoughts on this.

                      On-Page Optimization | Mar 23, 2017, 1:35 PM | maghanlinchpinsales
                      0
                    • Matthew_smart

                      Home page keyword in url

                      I have been looking into SEO for a few weeks now trying to perfect a homepage. Going through various sources on MOZ, and other examples out there on the internet, I keep seeing that you should have your keyword in the URL of the page. The homepage is the page most people want to rank the highest in google searches, however, you cannot put the keyword in the URL as most home page URLs are simply /. Should I actually make the home like this: www.example.com/key-word-example? I would imagine this would not be the normal for many users and would seem like it's not the home page.

                      On-Page Optimization | Mar 11, 2016, 6:09 PM | Matthew_smart
                      0
                    • Luciana_BAH

                      Duplicate URL's in Sitemap? Is that a problem?

                      I submitted a sitemap to on Search Console - but noticed that there are duplicate URLs, is that a problem for Google?

                      On-Page Optimization | Mar 7, 2016, 8:59 PM | Luciana_BAH
                      0
                    • MeasureEverything

                      Should I use an acronym in my URL?

                      I know that Google understands various acronyms. Example: If I search for CRM System, it knows i'm searching for a customer relationship management system. However, will it recognize less known acronyms? I have a page geared specifically for SAP data archiving for human capital management systems. For those in the industry, they simply call it HCM. Here is how I view my options: Option #1: www.mywebsite.com/sap-data-archiving/human-capital-management Option #2: www.mywebsite.com/sap-data-archiving/hcm Option #3: www.mywebsite.com/sap-data-archiving/hcm-human-capital-management With option #3, i'm capturing the acronym AND the full phrase. This doesn't make my URL overly long either. Of course, in my content i'll reference both. What does everyone else think about the URL? -Alex

                      On-Page Optimization | Jul 2, 2015, 11:27 AM | MeasureEverything
                      0
                    • StoryScout

                      Is using hyphens in a URL to separate words good practice?

                      Hi guys, I have a client who wants to use a hyphen to separate two words in the URL to make each work stand out. Is is good or bad practice to use a hyphen in a URL and will it affect rankings? Thanks!

                      On-Page Optimization | Mar 3, 2015, 12:34 AM | StoryScout
                      0
                    • estebanseo

                      Using keywords in my URL: Doing a redirect to /keyword

                      My website in "On Page Grade" received an A.Anyway, I only have 1 thing to optimize:_"Use Keywords in your URL__Using your targeted keywords in the URL string adds relevancy to your page for search engine rankings, assists potential visitors identify the topic of your page from the URL, and provides SEO value when used as the anchor text of referring links."_My website is ranking in top10 for a super high competitive keyword and all my others competitors have the keyword on their domain, but not for my URL.Since I can't change my domain for fixing this suggestion, I would like to know what do you think about doing a 301 redirect from / to mydomainname.com/keyword/So the index of my website would be the /keyword.I don't know if this can make a damage to my SERP for the big change ir it would be a great choice.

                      On-Page Optimization | Mar 30, 2015, 10:13 AM | estebanseo
                      0
                    • webbutler13

                      Correct .htaccess settings for canonical url?

                      I want to forward all urls to http:www.mysite.com but am a little confuse because I am getting duplicate content error: Pages with Duplicate Page Content as of Jan 15http://titanappliancerepair.com/ 1 duplicatehttp://titanappliancerepair.com 1 duplicatehttp://titanappliancerepair.com/index.html 1 duplicate*****************************************************************What should I put ion htaccess file so I can forwardhttp://titanappliancerepair.com/index.htmlhttp://titanappliancerepair.comhttp://titanappliancerepair.com/to  http://www.titanappliancerepair.comor what is the correct way to do it?I'm confused because when I enter http://titanappliancerepair.com/ in browser it showshttp://titanappliancerepair.com so how can it be considered duplicate content?.Can someone help?I have godaddy and they have gave me this code to put RewriteEngine on
                      rewritecond %{http_host} ^coolexample.com [nc]
                      rewriterule ^(.)$ http://www.coolexample.com/$1 [r=301,nc]What is correct?

                      On-Page Optimization | Jan 21, 2014, 6:21 PM | webbutler13
                      0
                    • flcity15

                      URL Domain Used in Meta Description

                      Today I was asked if using a domain url in your meta description can have a negative impact on your website. This description includes a list of the homepage url, but directs visitors to a different internal page of the website. My concern fell with directing visitors to a different page of the site, but promoting the homepage in the description/snippet. With Penguin 2.1 release on the 4th, I'm very cautious of my links/urls. What are your thoughts behind this? What are the possible, if any negative impacts this could have on a site? This URL does have a brand name as so the Title.

                      On-Page Optimization | Oct 16, 2013, 5:23 PM | flcity15
                      0

                    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
                    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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                    • Accessibility
                    • Terms of Use
                    • Privacy

                    Looks like your connection to Moz was lost, please wait while we try to reconnect.