undefined
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
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • Case Studies
    • 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.

    • SEO Q&A

      Insights & discussions from an SEO community of 500,000+.

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • 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.

    • Case Studies

      Explore how Moz drives ROI with a proven track record of success.

    • 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. Redirecting index.html to the root

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.

Redirecting index.html to the root

Intermediate & Advanced SEO
8
11
48.6k
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.
  • romanbond
    romanbond last edited by May 16, 2013, 4:17 PM

    Hi, I was wondering if there is a safe way to consolidate link juice on a single version of a home page. I find incoming links to my site that link to both mysite.com/ and mysite.com/index.html. I've decided to go with mysite.com/ as my main and only URL for the site and now I'd like to transfer all link juice from mysite.com/index.html to mysite.com/
    When i tried 301 redirect from index.html to the root it created an indefinite loop, of course.

    I know I can use a RewriteRule.., but will it transfer the juice??

    Please help!

    1 Reply Last reply Reply Quote 7
    • Nikos-Kor
      Nikos-Kor @StreamlineMetrics last edited by Sep 27, 2021, 9:27 PM

      @streamlinemetrics this worked for my site Finbit Solutions, too! Thank you very much!

      1 Reply Last reply Reply Quote 0
      • topic:timeago_earlier,about a year
      • salena580
        salena580 @StreamlineMetrics last edited by Aug 23, 2020, 5:27 PM Aug 23, 2020, 5:27 PM

        It works good for my site https://uaedesertsafari.com/

        1 Reply Last reply Reply Quote 0
        • topic:timeago_earlier,2 years
        • wideangle
          wideangle @StreamlineMetrics last edited by Aug 14, 2018, 11:34 AM Aug 14, 2018, 11:34 AM

          works, thank you!

          1 Reply Last reply Reply Quote 0
          • topic:timeago_earlier,4 years
          • almusammem
            almusammem @StreamlineMetrics last edited by Dec 22, 2014, 9:17 PM Dec 22, 2014, 9:17 PM

            Thank you very much, this works fine with me.

            1 Reply Last reply Reply Quote 0
            • webfeatus
              webfeatus last edited by Dec 17, 2014, 1:43 AM Dec 17, 2014, 1:43 AM

              Google may see this as a 301 but MOZ crawl does not seem to.
              Can you please help explain this?

              I am looking for a good .htaccess code for this redirect.

              1 Reply Last reply Reply Quote 0
              • topic:timeago_earlier,about a year
              • enxaqueca
                enxaqueca last edited by Oct 12, 2013, 9:55 PM Oct 12, 2013, 9:55 PM

                Thank you, Streamline Metrics. I looked everywhere and tried several different edits in my htaccess for a 301 redirect from index.html to root, but none worked. Your code worked wonderfully.

                1 Reply Last reply Reply Quote 0
                • topic:timeago_earlier,5 months
                • romanbond
                  romanbond @StreamlineMetrics last edited by May 16, 2013, 6:22 PM May 16, 2013, 6:22 PM

                  that seems to be working well. thanks a lot for your help.

                  1 Reply Last reply Reply Quote 0
                  • StreamlineMetrics
                    StreamlineMetrics @romanbond last edited by May 16, 2013, 7:20 PM May 16, 2013, 4:49 PM

                    If you want to redirect all index.html(s) to their roots, then try this code -

                    RewriteEngine On
                    RewriteRule ^index.html$ / [R=301,L]
                    RewriteRule ^(.*)/index.html$ /$1/ [R=301,L]

                    And yes, Google will treat them as 301 redirects so your juice will be transferred and consolidated.

                    romanbond almusammem wideangle salena580 Nikos-Kor 5 Replies Last reply Sep 27, 2021, 9:27 PM Reply Quote 6
                    • romanbond
                      romanbond @StreamlineMetrics last edited by May 16, 2013, 4:35 PM May 16, 2013, 4:35 PM

                      thanks, that was quick!
                      A couple of questions before i go ahead and implement it:

                      will this rule re-direct all index.html(s) to their appropriate roots or will it work just for the home page?
                      Also, as far as user's expirience is concerned this will take care of redirecting requests to show index.html to the root, but what about the juice transfer. Will Google treat it as 301?

                      StreamlineMetrics 1 Reply Last reply May 16, 2013, 4:49 PM Reply Quote 4
                      • StreamlineMetrics
                        StreamlineMetrics last edited by May 16, 2013, 4:22 PM May 16, 2013, 4:22 PM

                        It's definitely a good idea to 301 redirect index.html to your root to consolidate link juice. I am assuming you have an .htaccess file so the following lines should work -

                        RewriteEngine On
                        RewriteBase /

                        redirect html pages to the root domain

                        RewriteRule ^index.html$ / [NC,R,L]

                        romanbond 1 Reply Last reply May 16, 2013, 4:35 PM Reply Quote 6
                        • 1 / 1
                        1 out of 11
                        • First post
                          1/11
                          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

                        • gozmoz

                          Moving html site to wordpress and 301 redirect from index.htm to index.php or just www.example.com

                          I found page duplicate content when using Moz crawl tool, see below. http://www.example.com
                          Page Authority 40
                          Linking Root Domains 31
                          External Link Count 138
                          Internal Link Count 18
                          Status Code 200
                          1 duplicate http://www.example.com/index.htm
                          Page Authority 19
                          Linking Root Domains 1
                          External Link Count 0
                          Internal Link Count 15
                          Status Code 200
                          1 duplicate I have recently transfered my old html site to wordpress.
                          To keep the urls the same I am using a plugin which appends .htm at the end of each page. My old site home page was index.htm. I have created index.htm in wordpress as well but now there is a conflict of duplicate content. I am using latest post as my home page which is index.php Question 1.
                          Should I also use redirect 301 im htaccess file to transfer index.htm page authority (19) to www.example.com If yes, do I use
                          Redirect 301 /index.htm http://www.example.com/index.php
                          or
                          Redirect 301 /index.htm http://www.example.com Question 2
                          Should I change my "Home" menu link to http://www.example.com instead of http://www.example.com/index.htm that would fix the duplicate content, as indx.htm does not exist anymore. Is there a better option? Thanks

                          Intermediate & Advanced SEO | Feb 23, 2017, 12:19 PM | gozmoz
                          0
                        • brianvest

                          301 redirects Ruby on Rails

                          Can anyone point me to the best way to implement 301 redirects on a Ruby on Rails website?

                          Intermediate & Advanced SEO | Apr 19, 2016, 3:13 PM | brianvest
                          0
                        • WeAreDigital_BE

                          Geo-Redirect: good idea or not?

                          Hi Mozzers, The background: I have this very corporate .com domain which is used worldwide. Next to that, we have another .com domain which is specifically created for the US visitors. Within the organic rankings, we notice that our corporate domain is ranking much better in the US. Many visitors are arriving on this domain. As it is a corporate domain being used worldwide, they get lost. My questions: I know there are ways to redirect by location. Would it be smart to automatically redirect US visitors for the corporate domain to the commercial US-specific domain? Is it possible to only redirect US visitors and leave the website as it is for visitors from other countries. Won't this harm the corporate website (organically) worldwide? If this would be a good idea, any recommended plugins or concrete procedures? Thank you so much for helping me out!
                          Sander

                          Intermediate & Advanced SEO | Sep 25, 2015, 9:12 AM | WeAreDigital_BE
                          0
                        • Kingalan1

                          Low text-HTML ratios

                          Are low text-HTML ratios still a negative SEO ranking factor? Today I ran SEMRUSH site audit that showed 344 out of 345 pages on our website (www.nyc-officespace-leader.com) show an text-HTML ratio that ranges from 8% to 22%.  This is characterized as a warning on SEMRUSH. This error did not exist in April when the last SEMRUSH audit was conducted. Is it worthwhile to try to externalize code in order to improve this ratio? Or to add  text (major project on a site of this size)? These pages generally have 200-400 words of text. Certain URLs, for example www.nyc-officespace-leader.com/blog/nycofficespaceforlease more text, yet it still shows an text-HTML ratio of only 16%. We recently upgraded to the WordPress 4.2.1. Could this have bloated the code (CSS etcetera)  to the detriment of the text-HTML ratio? If Google has become accustomed to more complex code, is this a ratio that I can ignore. Thanks, Alan

                          Intermediate & Advanced SEO | Jan 30, 2017, 11:02 AM | Kingalan1
                          0
                        • ArchMedia

                          Should I redirect images when I migrate my site

                          We are about to migrate a large website with a fair few images (20,000). At the moment we include images in the sitemap.xml so they are indexed by Google and drive traffic (not sure how I can find out how much though). Current image slugs are like:
                          http://website.com/assets/images/a2/65680/thumbnails/638x425-crop.jpg?1402460458 Like on the old site, images on the new website will also have unreadable cache slugs, like:
                          http://website.com/site_media/media/cache/ce/7a/ce7aeffb1e5bdfc8d4288885c52de8e3.jpg All content pages on the new site will have the same slugs as on the old site. Should I go through the trouble of redirecting all these images?

                          Intermediate & Advanced SEO | Jul 7, 2014, 10:49 AM | ArchMedia
                          0
                        • khi5

                          Infinite Scrolling: how to index all pictures

                          I have a page where I want to upload 20 pictures that are in a slideshow. Idea is that pictures will only load when users scroll down the page (otherwise too heavy loading). I see documentation on how to make this work and ensure search engines index all content. However, I do not see any documentation how to make this work for 20 pictures in a slideshow. It seems impossible to get a search engines to index all such pictures, when it shows only as users scroll down a page. This is documentation I am already familiar with, and which does not address my issue:
                          http://googlewebmastercentral.blogspot.com/2014/02/infinite-scroll-search-friendly.html http://www.appelsiini.net/projects/lazyload http://luis-almeida.github.io/unveil/ thank you

                          Intermediate & Advanced SEO | May 15, 2014, 3:50 AM | khi5
                          0
                        • MattBarker

                          Does a 302 redirect pass penalties?

                          I'm having problems finding a definitive answer to this question, there is a lot of rumour and gossip out there but nothing I can rely on. I'm working with a site that received an unnatural links notice followed by a massive drop in search traffic. Looking at the link profile it's pretty much jacked beyond repair and I have recommended that we move over to a fresh domain. However, it's an established brand with many more sources of traffic than organic search. There's no way we can burn all their repeat visits, loyal customers, brand recognition that they've built up over the years so I want to redirect from the old domain to the new.  This is not to try and make any SEO gain from the previous site, frankly we don't give a crap about that. We just want to maintain the brand. A 302 is a temporary redirect, this will be a permanent move BUT a 301 will pass on the penalty.  So can we safely use a 302 redirect in this situation or is there a better alternative (meta refresh?) Thanks for your help! MB.

                          Intermediate & Advanced SEO | Oct 24, 2013, 9:49 AM | MattBarker
                          0
                        • cottamg

                          GeoIP - Redirect all but target country

                          My client would like to redirect all non UK traffic from their UK site to their main group site. I am intending to use a .htaccess redirect, like this: RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !^GB$
                          RewriteRule ^(.*)$ http://www.group.com$1 [R,L] I have tested the redirect at it works fine. My question is if I put this in place would it have any negative SEO impact on the UK site?

                          Intermediate & Advanced SEO | May 12, 2012, 5:32 AM | cottamg
                          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.