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. Intermediate & Advanced SEO
    4. How can I block unwanted urls being indexed on google?

    How can I block unwanted urls being indexed on google?

    Intermediate & Advanced SEO
    5 4 1.3k
    • 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.
    • VipinLouka78
      VipinLouka78 last edited by

      Hi,

      I have to block unwanted urls (not that page) from being indexed on google. I have to block urls like example.com/entertainment not the exact page example.com/entertainment.aspx . Is there any other ways other than robot.txt? If i add this to robot.txt will that block my other url too? Or should I make a 301 redirection from example.com/entertainment to example.com/entertainment.aspx. Because some of the unwanted urls are linked from other sites.

      thanks in advance.

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

        301 is definitely the way to go, especially if you have inbound links to the unwanted pages. That will preserve most of your rank and transfer it to the actual page.

        As far as blocking goes, you can use a robots.txt or a robots meta tag on your page with a NOFOLLOW,NOINDEX

        1 Reply Last reply Reply Quote 1
        • seohive-222720
          seohive-222720 last edited by

          Vipin

          My understanding is that if you block anything from Robots.txt that you prevent link juice from flowing for the pages.  If the pages in question have links to them then I agree with Highland to 301 redirect them to the correct pages.

          shivun

          1 Reply Last reply Reply Quote 1
          • Nick_Ker
            Nick_Ker last edited by

            Since some of the unwanted URLs are linked from other sites, use 301 redirects.

            Usually, people want to remove the file extensions like .aspx for cleaner looking, shorter URLs.

            You can remove the .aspx extension from all pages with a rewrite like this in .htaccess:

            RewriteEngine on
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteCond %{REQUEST_FILENAME}.aspx -f
            RewriteRule ^(.*)$ $1.aspx

            If you want to keep the URLs with .aspx, rather than without, I think you will have to use individual 301 redirects.

            1 Reply Last reply Reply Quote 1
            • VipinLouka78
              VipinLouka78 last edited by

              Hi Nick,

              Thanks so much!

              Is there any advantage for shorter URLs over long ones? My site is on IIS6, How can I remove the .aspx extension in IIS6?

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • Google Only Indexing Canonical Root URL Instead of Specified URL Parameters
                Nitruc
                Nitruc
                0
                3
                57

              • Can you index a Google doc?
                LindsayE
                LindsayE
                1
                3
                43

              • If I block a URL via the robots.txt - how long will it take for Google to stop indexing that URL?
                GastonRiera
                GastonRiera
                0
                3
                98

              • How can I make a list of all URLs indexed by Google?
                Worship_Digital
                Worship_Digital
                0
                10
                47.3k

              • Will disallowing URL's in the robots.txt file stop those URL's being indexed by Google
                Martijn_Scheijbeler
                Martijn_Scheijbeler
                0
                11
                1.6k

              • If Robots.txt have blocked an Image (Image URL) but the other page which can be indexed has this image, how is the image treated?
                alphonseha
                alphonseha
                1
                4
                1.4k

              • How can I get a list of every url of a site in Google's index?
                KaneJamison
                KaneJamison
                0
                8
                1.1k

              • How long does google index old urls?
                daracreative
                daracreative
                0
                3
                108

              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