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. Website blog is hacked. Whats the best practice to remove bad urls

    Website blog is hacked. Whats the best practice to remove bad urls

    Technical SEO Issues
    2 2 62
    • 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.
    • ajiabs
      ajiabs last edited by

      Hello

      So our site was hacked which created a few thousand spam URLs on our domain. We fixed the issue and changed all the spam urls now return 404. Google index shows a couple of thousand bad URLs.

      My question is-

      What's the fastest way to remove the URLs from google index. I created a site map with sof the bad urls and submitted to Google. I am hoping google will index them as they are in the sitemap and remove from the index, as they return 404.

      Any tools to get a full list of google index? ( search console downloads are limited to 1000 urls). A Moz site crawl gives larger list which includes URLs not in Google index too. Looking for a tool that can download results from a site: search.

      Any way to remove the URLs from the index in bulk? Removing them one by one will take forever.

      Any help or insight would be very appreciated.

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

        Technically 404 means "temporarily unavailable but coming back later" so you might want to consider Status 410 instead of 404. You could also supplement it with Meta no-index, if you can't use the HTML implementation then fire the no-index directive through the HTTP header using X-robots:

        https://developers.google.com/search/reference/robots_meta_tag (scroll down a little to find the relevant part)

        E.g:

        "HTTP/1.1 200 OK

        Date: Tue, 25 May 2010 21:42:43 GMT
        (…)
        X-Robots-Tag: noindex
        (…)"

        ... something like that.

        You can't use Search Console to remove URLs from Google at all. The remove URL tool, only removes URLs one at a time and it only does so 'temporarily', the URLs pop back again after a bit. The best thing you can do is give Google some harsher directives and hope they listen, in a month or two most of those should be gone

        Don't use robots.txt on the URLs as, if Google can't crawl them it won't find the 410s or the no-index directives

        1 Reply Last reply Reply Quote 2
        • 1 / 1
        • First post
          Last post
        • Topic Cluster: URL Best Practices
          Andrew-SEO
          Andrew-SEO
          0
          2
          908

        • Best Practice For URL When Creating Silo Architecture
          Mark_Ginsberg
          Mark_Ginsberg
          0
          2
          976

        • Best practice around removing large section of the website
          TomRayner
          TomRayner
          0
          2
          205

        • Confused on footer links (Which are best practices for footer links on other websites?)
          CommercePundit
          CommercePundit
          0
          13
          1.3k

        • What is the best practice to seperate different locations and languages in an URL? At the moment the URL is www.abc.com/ch/de. Is there a better way to structure the URL from an SEO perspective?
          irvingw
          irvingw
          0
          2
          64

        • SEO url best practices
          Kibin
          Kibin
          0
          3
          445

        • What's best practice for blog meta titles?
          BWrightTLM
          BWrightTLM
          0
          3
          253

        • Best Practice to Remove a Blog
          KaneJamison
          KaneJamison
          0
          8
          715

        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