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. Yoast SEO. After set up 404 error pages

    Yoast SEO. After set up 404 error pages

    Technical SEO Issues
    3 2 983
    • 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.
    • A_Fotografy
      A_Fotografy last edited by

      Hello all,

      Something strange happened with my blog site.

      I recently signed to MOZ tools.

      Initially everything was fine, but during my last crawl I got loads of 404
      pages.

      Few days ago I was tweaking some settings in SEO plugin according to this post https://moz.com/blog/setup-wordpress-for-seo-success

      What I noticed was that 404 pages were coming from my blog posts, but for
      some reason category was missing in those posts.

      For example this link is 404
      https://a-fotografy.co.uk/inchcolm-island-wedding-photography-bailie

      The one with category is

      https://a-fotografy.co.uk/wedding-pictures/inchcolm-island-wedding-photography-bailie/

      So basically for some reason category was missing.

      Please let me know how can I fix this instead of doing hundreds of
      redirects now.

      Thank you,
      Regards,
      Armands

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

        From your description, it appears that when you were tweaking your Yoast SEO settings, you changed the permalink structure in the WP Dashboard's Settings > Permalinks section from www.domain.com/�tegory%/%postname%/ to just www.domain.com/%postname%/

        Doing this causes all the URLS for all posts on your site to change, which means all the original URLs are no longer correct and result in 404s.

        Your two options are:

        • reset your permalinks back to their original structure, and redirect whatever new posts were created since the initial change back to the /category/postname URLs
        • leave the new permalink structure in place and add a blanket rewrite rule in the htaccess file to redirect all the old post URLs to the new structure without the category. (Done properly, only one redirect is needed to handle all the post URLs.)

        Personally, for improved site architecture and to keep from having all your existing posts run through redirects, I'd opt for the first option above.

        Hope that all makes sense?

        Paul

        P.S. Make certain you have a current backup of the site before making any further changes, just in case.

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

          Hi,

          Thanks for response. So I went back and unchecked Strip the category base (usually /category/) from the category URL option and also

          Redirect attachment URLs to parent post URL. option.

          Hope this will solve the problem.

          Thanks,

          Regards,

          Armands

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • 404 error due to a page which requires a login
            MikeRoberts
            MikeRoberts
            0
            2
            97

          • Client error 404 pages!
            PeterC-B
            PeterC-B
            0
            4
            169

          • Off-page SEO and on-page SEO improvements
            josh-riley
            josh-riley
            0
            5
            918

          • Locating 404 Page Errors for Deletion
            TOMMarketingLtd.
            TOMMarketingLtd.
            0
            4
            391

          • Yoast WordPress SEO settings please help
            wolfinjo
            wolfinjo
            0
            9
            845

          • Why is it that in the exported CSV there are no refrerring pages shown for 404 errors?
            JackieRae
            JackieRae
            0
            2
            427

          • 404 errors on a 301'd page
            CodyWheeler
            CodyWheeler
            0
            2
            704

          • Should there be a canonical tag on my 404 error page?
            ajmihalic4
            ajmihalic4
            0
            6
            7.6k

          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

          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