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. Magento Redirect Loop

    Magento Redirect Loop

    Technical SEO Issues
    9 3 3.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.
    • Imajery
      Imajery last edited by

      On my clients site I changed the URL structure for products.

      First they had a trailing slash:

      http://www.wellamy.com/market/food/oklahoma-relief-effort/healthy-snacks/caramel-apple-chewy-snack-bars/

      I changed it to end in .html

      http://www.wellamy.com/market/food/oklahoma-relief-effort/healthy-snacks/caramel-apple-chewy-snack-bars.html

      Now rather than redirecting properly, it causes a redirect loop.

      Any idea how I can fix this?

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

        I would need to look at your code.

        but why redirect to .html, it does nothing for you, and does not read as well.

        my preferred url is with the slash at the end and no extension, I don't like the slash because people rarely write a slash when manually typing your url, causing a redirect to the slash.

        to get rid of slash you need something like

        RewriteRule (.)/$ $1 [L,R]
        or if you must have .html
        RewriteRule (.
        )/$ $1.html [L,R]

        Imajery 1 Reply Last reply Reply Quote 1
        • LynnPatchett
          LynnPatchett last edited by

          Hi Ryan,

          Have you manually forced a refresh of the catalog url rewrites index and cleared all you caches? Basic I know, but sometimes gets overlooked.

          Imajery 1 Reply Last reply Reply Quote 0
          • Imajery
            Imajery @LynnPatchett last edited by

            Hi. Yes I've done this, on my magento and browser, but had no luck fixing.

            1 Reply Last reply Reply Quote 0
            • Imajery
              Imajery @AlanMosley last edited by

              I thought that the trailing slash for a product page gets seen as a directory. It's not, it's just a page.

              What are your throughts on that?

              AlanMosley 1 Reply Last reply Reply Quote 0
              • AlanMosley
                AlanMosley @Imajery last edited by

                It would not mater what it sees it as, its what renders that is important. but web servers can tell what is a directory and what is not, I assume search engines can too.

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

                  where have you set this redirect, via magneto? or in the .htaccess file?

                  I would look in my htaccess file and see what redirects are there

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

                    Alan is right, have a look at your htaccess file in the first instance to see if there are any added redirects that are conflicting with the magento system redirects. If not then I think you have managed to get magento confused switching between the tralling slash and the .html endings.

                    I agree with Alan that personally I prefer no slash and no .html. It might be worth taking both off and seeing if the system starts redirecting as you expect (on a test server!). If not then you might want to look at emptying your url redirect table in the db and then doing a manual url index update again (again, on a test environment). It seems that the root of your problem is a redirect loop on the trailing slash version of the url (it redirects to itself in other words) and the non trailing slash also redirects to this page.  I suspect this is in the magento url db and not through htaccess, but you need to confirm that before messing with the db needlessly.

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

                      Thanks. I will look into this. great answer.

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      • Redirection chain and Javascript Redirect
                        0
                        1
                        19

                      • Magento Category Suffix - redirect issue
                        0
                        1
                        27

                      • Problems with canonical urls / redirect (magento webshop)
                        RBijsterveld
                        RBijsterveld
                        0
                        3
                        94

                      • Hreflang tags with link to redirect loop
                        DanielKiely6
                        DanielKiely6
                        0
                        3
                        817

                      • How do I fix a 301 Redirect Loop?
                        Gotmoxie
                        Gotmoxie
                        0
                        5
                        3.4k

                      • Where to put 301 redirects in Magento?
                        IPROdigital
                        IPROdigital
                        0
                        4
                        686

                      • Redirect
                        petrakraft
                        petrakraft
                        0
                        9
                        958

                      • I think I'm stuck in a 301 redirect loop
                        Technical_Contact
                        Technical_Contact
                        0
                        5
                        1.8k

                      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