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

                        • 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
                        • viatrading1

                          Several 301 Redirects to Same Page

                          Hi, I have 3 Pages we won't use anymore in our website. Let's call them url A, url B and url C. To keep their SEO strength on our domain, I've though about redirecting all of them to url D. For what I understand, when 301 redirecting, about 85-90% of the link SEO juice is passed. Then, if I redirect 3 URLs to the same page... does url D receive all the link SEO juices for URLs added up? (approximately)
                          e.g. future url D juice = 100% current url D juice + 85% url A juice + 85% url B juice + 85% url C juice Is this the best practice, or is there a better way? Cheers,

                          Intermediate & Advanced SEO | Oct 14, 2015, 12:28 AM | viatrading1
                          0
                        • MarkWill

                          Blog subdomain not redirecting

                          Over the last few weeks I have been focused on fixing high and medium priority issues, as reported by the Moz crawler, after a recent transition to WordPress. I've made great progress, getting the high priority issues down from several hundred (various reasons, but many duplicates for things like non-www and www versions) to just five last week. And then there's this weeks report. For reasons I can't fathom, I am suddenly getting hundreds of duplicate content pages of the form http://blog.<domain>.com</domain> (being duplicates with the http://www.<domain>.com</domain> versions). I'm really unclear on why these suddenly appeared. I host my own WordPress site ie WordPress.org stuff. In Options / General everything refers to http://www.<domain>.com</domain> and has done for a number of weeks. I have no idea why the blog versions of the pages have suddenly appeared. FWIW, the non-www version of my pages still redirect to the www version, as I would expect. I'm obviously pretty concerned by this so any pointers greatly appreciated. Thanks. Mark

                          Intermediate & Advanced SEO | May 13, 2015, 2:36 PM | MarkWill
                          0
                        • friendoffood

                          Pages are Indexed but not Cached by Google. Why?

                          Here's an example: I get a 404 error for this: http://webcache.googleusercontent.com/search?q=cache:http://www.qjamba.com/restaurants-coupons/ferguson/mo/all But a search for qjamba restaurant coupons gives a clear result as does this: site:http://www.qjamba.com/restaurants-coupons/ferguson/mo/all What is going on?  How can this page be indexed but not in the Google cache? I should make clear that the page is not showing up with any kind of error in webmaster tools, and Google has been crawling pages just fine.  This particular page was fetched by Google yesterday with no problems, and even crawled again twice today by Google  Yet, no cache.

                          Intermediate & Advanced SEO | Jan 30, 2015, 12:55 PM | friendoffood
                          2
                        • DA2013

                          How do you 301 redirect URLs with a hashbang (#!) format? We just lost a ton of pagerank because we thought javascript redirect was the only way! But other sites have been able to do this – examples and details inside

                          Hi Moz, Here's more info on our problem, and thanks for reading! We’re trying to Create 301 redirects for 44 pages on site.com. We’re having trouble 301 redirecting these pages, possibly because they are AJAX and have hashbangs in the URLs. These are locations pages. The old locations URLs are in the following format: www.site.com/locations/#!new-york and the new URLs that we want to redirect to are in this format: www.site.com/locations/new-york We have not been able to create these redirects using Yoast WordPress SEO plugin v.1.5.3.2. The CMS is WordPress version 3.9.1 The reason we want to 301 redirect these pages is because we have created new pages to replace them, and we want to pass pagerank from the old pages to the new. A 301 redirect is the ideal way to pass pagerank. Examples of pages that are able to 301 redirect hashbang URLs include http://www.sherrilltree.com/Saddles#!Saddles and https://twitter.com/#!RobOusbey.

                          Intermediate & Advanced SEO | Mar 26, 2015, 1:29 PM | DA2013
                          0
                        • Seamoose

                          301 Redirection and apostrophes in URLs

                          Hi I am experiencing trouble getting any redirects with apostrophes in the URLs to 301 redirect in order to eliminate 404 errors. I have tried replacing the instance of the apostrophe in the source URL field to %27 and variations of this but to no avail. The site is a wordpress site (the old URLS are legacies from the old Business Catalyst site) and I am using the redirection plug in. I have gone into some detail with a helpful soul here http://wordpress.org/support/topic/how-to-deal-with-apostrophes-in-source-url but unfortunately to no result. If anyone has any idea how to solve this puzzle I would be grateful for the help. Example: http://www.tesselaars.com/blog/Inside_Flowers/post/Online_Marketing_for_Florists_Part_1%E2%80%93_A_Website_You_Won%27t_Regret/

                          Intermediate & Advanced SEO | May 1, 2013, 2:17 AM | Seamoose
                          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 | Dec 16, 2012, 6:14 PM | Travis-W
                          0
                        • pbhatt

                          301 Redirects After Company Acquisition

                          We recently acquired a company, and now we are going to redirect all of the pages on their site to their respective pages on our site. Do we need to keep the original pages on their site active? For how long? Ideally, we would like to redirect everything and remove the old site entirely so we don't have to pay to keep hosting it. Is this possible? Thanks!

                          Intermediate & Advanced SEO | Oct 11, 2011, 7:23 PM | pbhatt
                          1

                        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.