Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Digital Marketers
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • MozCon

        Save on Early Bird tickets and join us in London or New York City

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Digital Marketers

        Simplify SEO tasks to save time and grow your traffic.

      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. Home
    2. SEO Tactics
    3. Intermediate & Advanced SEO
    4. 301 redirect from .html to non .html?

    Moz Q&A is closed.

    After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

    301 redirect from .html to non .html?

    Intermediate & Advanced SEO
    2
    7
    4401
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • seointern
      seointern last edited by

      Previously our site was using this as our URL structure: www.site.com/page.html. A few months ago we updated our URL structure to this: www.site.com/page & we're not using the .html.

      I've read over this guide & don't see anywhere that discusses this: http://www.seomoz.org/learn-seo/redirection.

      I've currently got a programmer looking into, but am always a bit weary with their workarounds, as I'd previously had them cause more problems then fix it. Here is the solution he is looking to do:

      The way that I am doing the redirect is fine. The problem is of where to put the code. The issue is that the files are .html files that need to be redirected to the same url with out a .html on them. I can see if I can add that to the 404 redirect page if there is one inside of there and see if that does the trick. That way if there is no page that exists without the .html then it will still be a 404 page. However if it is there then it will work as normal. I will see what I can find and get back.

      Any help would be greatly appreciated.

      Thanks,

      BJ

      1 Reply Last reply Reply Quote 0
      • seointern
        seointern @seointern last edited by

        Sha,

        I wanted to send a quick update & see if we're on the right track? After implementing this 301 redirect, I'm seeing a few negatives, but also a few positives & would appreciate your feedback:

        Concerns:

        • Google Organic Traffic has dropped by 26.65% since we implemented the redirect (12 Days).

        • Top Content Pages From Search Traffic has dropped from a weekly average of 1,500 pages to 998. I've segmented the Analytics to see if I had more or less pages that were driving traffic to my site (Organic Only).

        Positives:

        • Bing Organic Traffic is up 32.15% although not substantial for our overall traffic, but it has increased.

        • Yahoo Organic Traffic is up 26.53% less traffic than Bing, so not substantial.

        • Webmaster Tools Pages crawled per day: http://screencast.com/t/krkD69bj3mG we've had a huge spike, which I'm assuming is a good thing & a direct correlation to the 301 redirect.

        All this being said, are we on the right track? The initial traffic loss had me worried, but after seeing the crawl stats it gave me hope? Do i just need to be more patient to see this through? Are we missing anything, or is this what you would expect?

        Thanks,

        BJ

        1 Reply Last reply Reply Quote 1
        • ShaMenz
          ShaMenz @seointern last edited by

          Happy to help

          If you strike any issues let me know.

          Sha

          1 Reply Last reply Reply Quote 0
          • seointern
            seointern @seointern last edited by

            Thanks for all the help Sha! We'll play with the example code that you'd sent & see what we can come up with. After a few weeks I'll continue to watch our organic rankings & see how it affects us overall.

            Thanks,

            BJ

            1 Reply Last reply Reply Quote 0
            • ShaMenz
              ShaMenz @seointern last edited by

              Not having seen the code your programmer intends to use, that is not possible to say definitively. That is why we built the test for you, so that you can see the code.

              If you take a look at the code you will see that the Rule is writing 301 redirects if the conditions are met.

              A .htaccess file is read from top to bottom. The first condition matched will be the one used.

              Basically, you have one set of files on your server, all of which have the extension .html.

              When a request is made, you are asking the server to load  the .html file in the browser, but rewrite a "pretty URL" for the user to see in the Address Bar.

              So, there are three possible scenarios for a request:

              1. the user requests /page.html (server loads.html and rewrites the URL to /page)
              2. the user requests /page (server 301 redirects request to /page.html, loads it in the browser and rewrites the URL to /page)
              3. the user requests a page that does not exist on the server (server 301 redirects the page to /404.html, loads it and rewrites the URL to /404)

              Personally, I would not be going out of my way to rewrite simple URL's just to remove the .html extension, but that is your choice, and I am assuming there is more to it and you had some good reason for doing this in the first place.

              The one thing you need to be cautious of in making these types of decisions is that chopping and changing from one thing to another and back again is not a great idea. A 301 redirect should really only be used when you are sure that you want to make a permanent change.

              Hope that helps,

              Sha

              1 Reply Last reply Reply Quote 1
              • seointern
                seointern @ShaMenz last edited by

                My fear with this approach is how the search engines will handle the redirect? I know that from the users perspective this should work, but I've never read any articles that even resemble this type of approach.

                Do you believe that this method will pass the value along in the search engines & treat it as a proper 301 redirect.

                Thanks,

                BJ

                ShaMenz seointern 4 Replies Last reply Reply Quote 0
                • ShaMenz
                  ShaMenz last edited by

                  Hi BJ,

                  From the information you included here it seems your programmer's approach is sound.

                  We made a demo for you with a working test and example code for the .htaccess so that you can check that it will achieve your aim in any likely scenario.

                  Take a look at 301 Redirect and URL Rewrite Example

                  Hope that helps,

                  Sha

                  seointern 1 Reply Last reply Reply Quote 1
                  • 1 / 1
                  • First post
                    Last post

                  Got a burning SEO question?

                  Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                  Start my free trial


                  Browse Questions

                  Explore more categories

                  • Moz Tools

                    Chat with the community about the Moz tools.

                  • SEO Tactics

                    Discuss the SEO process with fellow marketers

                  • Community

                    Discuss industry events, jobs, and news!

                  • Digital Marketing

                    Chat about tactics outside of SEO

                  • Research & Trends

                    Dive into research and trends in the search industry.

                  • Support

                    Connect on product support and feature requests.

                  • See all categories

                  Related Questions

                  • amberprata

                    301 Redirects for Multiple Language Sites in htaccess File

                    Hi everyone, I have a site  on a subdomain that has multiple languages set up at the domain level: https://mysite.site.com, https://mysite.site.fr ,  https://mysite.site.es , https://mysite.site.de , etc. We are migrating to a new subdomain and I am trying to create 301 redirects within the htaccess file, but I am a bit lost on how to do this as it seems you have to go from a relative url to an absolute - which would be fine if I was only doing this for the english site, but I'm not. It doesn't seem like I can go from absolute url to an absolute url - but I could be wrong. I am new to editing the htaccess file - so I could definitely use some advice here. Thanks.

                    Intermediate & Advanced SEO | | amberprata
                    0
                  • cathywix

                    301 Redirects to relative URLs not absolute a problem?

                    Hi we recently did a migration and a lot of content changed locations see: https://d.pr/i/RvqI81 Basically, the 301 goes to the correct location but its a relative URL (as you can see from the screenshot) rather than absolute URL. Do you think this is a high priority issue from an SEO standpoint, should we get the developer to change the redirects to absolute? Cheers.

                    Intermediate & Advanced SEO | | cathywix
                    0
                  • Colin.Accela

                    Setting up 301 Redirects after acquisition?

                    Hello! The company that I work for has recently acquired two other companies. I was wondering what the best strategy would be as it relates to redirects / authority. Please help! Thanks

                    Intermediate & Advanced SEO | | Colin.Accela
                    0
                  • ajarad

                    Geoip redirection, 301 or 302?

                    Hello all Let me first try to explain what our company does and what it is trying to achieve. Our company has an online store, sells products for 3 different countries, and two languages for each country. Currently we have one site, which is open to all countries, what we are trying to achieve is make 3 different stores for these 3 different countries, so we can have a better control over the prices in each country. We are going to use Geoip to redirect the user to the local store in his country. The suggested new structure is to add sub-folders as following: www.example.com/ca-en
                    www.example.com/ca-fr
                    www.example.com/us-en
                    ... If a visitor is located outside these 3 countries, then she'll be redirected to the root directory www.example.com/en We can't offer to expand our SEO team to optimize new pages for the local market, it's not the priority for now, the main objective now is to be able to control the prices for different market. so to eliminate the duplicate issue, we'll use canonical tags. Now knowing our objective from the new URL structure, I have two questions: 1- which redirect should we use? 301, 302? 
                    If we choose 301, then which version of the site will get the link juice? (i.e, /ca-en or /us-en?)
                    if we choose 302, then will the link juice remain in the original links? is it healthy to use 302 for long term redirections? 2- Knowing that Google bots comes from US-IP, does that mean that the other versions of the site won't be crawled (i.e, www.example.com/ca-fr), this is especially important for us as we are using AdWords, and unindexed pages will effect our quality score badly. I'd like to know if you have other account structure in your mind that would be better than this proposed structure. Your help is highly highly appreciated.
                    Thanks in advance.

                    Intermediate & Advanced SEO | | ajarad
                    0
                  • Davenport-Tractor

                    Redirecting non www site

                    Hello Ladies and Gentlemen. I 100% agree with the redirecting of the non www domain name. After all we see so many times, especially in MOZ how the two different domains contain different links, different DA and of course different PA. So I have posed the question to our IT company, "How would we go about redirecting our non www domain to the www version?", "Where would we do that?", " we cant do the redirect on our webserver because the website is listed as an IP address, not a domain name, so would we do the redirect somewhere at GoDaddy?" who is currently maintain our DNS record So here is the response from IT:  " I would setup a CNAME record in DNS (GoDaddy), such that no matter if you go to the bare domain, or the www, you end up in the same place. As for SEO, having a 301 redirect for your bare domain isn't necessary, because both the bare domain and the www are the same domain.  301 is a redirect for "permanently moved" and is common when you change domain names.  Using the bare domain or the www are NOT DIFFERENT DOMAINS, so the 301 would not be accurate, and you'd be telling engines you've moved, when you haven't - which may negatively impact your rank. It sounds to me that IT is NOT recommending the redirect. How can this be? Or are we talking about two different things? Will the redirect cause the melt down as the IT company suggests? Or do they nut understand SEO?

                    Intermediate & Advanced SEO | | Davenport-Tractor
                    0
                  • bloomnation

                    DNS or 301 Website Redirect

                    We are running a marketplace site, so we have thousands of vendors selling their products on our site. Each vendor has a Profile page and we are soon to launch a premium store-front that is white label. Many of these vendors will want to point a custom url to their premium store-front (which is a sub domain of the marketplace) and we are trying to get an understanding of how we should instruct them to point their url in a way that will give the main marketplace site the seo juice. We also want to understand what will show up in the address bar.  Will it be their url or our sub domain? Will any of the marketplace seo juice boost their url local listing status?

                    Intermediate & Advanced SEO | | bloomnation
                    0
                  • Travis-W

                    Multiple 301 Redirects for the Same Page

                    Hi Mozzers, What happens if I have a trail of 301 redirects for the same page? For example,
                    SiteA.com/10 --> SiteA.com/11 --> SiteA.com/13 --> SiteA.com/14 I know I lose a little bit of link juice by 301 redirecting.
                    The question is, would the link juice look like this for the example above? 100% --> 90% --> 81% -->72.9%
                    Or just 100% -----------------------------------------> 90% Does this link juice refer to juice from inbound links or links between internal pages on my site? Thanks!

                    Intermediate & Advanced SEO | | Travis-W
                    0
                  • Visually

                    Are there any negative effects to using a 301 redirect from a page to another internal page?

                    For example, from http://www.dog.com/toys to http://www.dog.com/chew-toys. In my situation, the main purpose of the 301 redirect is to replace the page with a new internal page that has a better optimized URL. This will be executed across multiple pages (about 20). None of these pages hold any search rankings but do carry a decent amount of page authority.

                    Intermediate & Advanced SEO | | Visually
                    0

                  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
                  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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                  • Accessibility
                  • Terms of Use
                  • Privacy

                  Looks like your connection to Moz was lost, please wait while we try to reconnect.