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. 404 from a 404 that 301s

    404 from a 404 that 301s

    Technical SEO Issues
    4 2 133
    • 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.
    • MikeRoberts
      MikeRoberts last edited by

      I must be missing something or skipping a step or lacking proper levels of caffeine.

      Under my High Priority warnings I have a handful of 404s which are like that on purpose but I'm not sure how Moz is finding them. When I check the referrer info, the 404 is being linked to from a different 404 which is now a 301 (due to craziness of our system and what was easiest for the coders to fix a different problem ages ago). Basically, if a user decides to type in a non-existent model number into the URL there is a specific 404 that comes up. While the 404 error is "site.com/product/?model=abc123" the referrer is "site.com/product?model=abc123" (or more simply, one slash is missing). I can't see how Moz is finding the referrer so I can't figure out how to make Moz stop crawling it. I actually have the same problem in Google WMT for the same group of 404s.

      What am I just not seeing that will fix this?

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

        Hi Mike,

        Hope all is well. There are two things that might have made this confusion. Either you have some outdated links somewhere on your website that are leading to the custom 404 page or some external link is pointing back to your website with a wrong URL or missing product. In order to find the link (I say so, because a crawler has to hit a link to crawl so there is definitely one), you can use tools like Ahrefs link analysis and see what is pointing where. export to an excel and filter based on a RegEx you'd make out a 404 generating pattern you already have with Moz or Google WMT. You find one and you'll know where they are coming from and how to fix them. You'd be able to write custom redirects in your htaccess if they are not many. If they are many though, htaccess could slow down your website and the best way would be a back-end base redirect either custom coded or through a plugin based on your platform. I would start from

        1. my error_logs in webserver logs and match them with WMT and Moz report.
        2. download CSV and import to excel or program of your choice
        3. filter based on the pattern
        4. Match it with where you've found the link through Ahref
        5. and Voila, now you know exactly how to clean them up

        Hope this helps Mike,

        Have a nice day,

        Ali

        MikeRoberts 1 Reply Last reply Reply Quote 1
        • MikeRoberts
          MikeRoberts @Ali_Sadr last edited by

          I had done about half of that... I'll take a look at all of it and try again tomorrow following your suggestions and see if I can figure it out then. Thanks.

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

            Let me know if it works Mike. There is actually a third possibility which is;

            Some page(s) might generate a dynamic URL only upon being visited by a browser/search agent. If that's the case, then you can set up an event tracking through your website in conjuction with Google Analytics and track teh refferer;

            _gaq.push(['_trackEvent', 'Error', '404', 'page: ' + document.location.pathname + document.location.search + ' ref: ' + document.referrer ]);

            After you collect some data (Submit your website to Google WMT or wait for next MOZ visit) you can export and run your filter.

            The alternative to this method could be one of the 2 following;

            1. enabling extreme debug/log mode on your programming platform and collect logs for further processing. You can run a small Python script to find the RegEx pattern. I advise to setup a demo copycat of your website on a subdomain and then run this experiment. You can then submit the demo sub domain to Google Webmaster tools and wait for the crawlers.
            2. Reconfigure your webserver logging (httpd.conf if using Apache) to log more details. Make sure you turn back into to the normal data collecting configuration to avoid storage consumption.

            Good luck,

            Ali

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            • What should I do with all these 404 pages?
              linklander
              linklander
              0
              5
              164

            • Redirect for Soft 404 or 404?
              JaredDetroit
              JaredDetroit
              0
              4
              2.4k

            • 404 issues
              DavidLee
              DavidLee
              0
              6
              92

            • I have custom 404 page and getting so much 404 error on Google webmaster, what should i do?
              NakulGoyal
              NakulGoyal
              0
              3
              357

            • 404 error
              GeorgeAndrews
              GeorgeAndrews
              0
              4
              338

            • 404 not working?
              newstd100
              newstd100
              0
              9
              378

            • 301 or a 404
              KeriMorgret
              KeriMorgret
              0
              5
              401

            • Too many 301s?
              johnshearer
              johnshearer
              0
              15
              1.0k

            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