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.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • 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. Digital Marketing
    3. Web Design
    4. Is it bad to have /index.php at the end of a uri?

    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.

    Is it bad to have /index.php at the end of a uri?

    Web Design
    3
    7
    4823
    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.
    • NoisyLittleMonkey
      NoisyLittleMonkey last edited by

      Is it bad for SEO if traffic is directed to "http://www.example.com/someuri/index.php" instead of "http://www.example.com/someuri/" and would it be works setting up a redirect rule at htaccess level?

      1 Reply Last reply Reply Quote 1
      • CleverPhD
        CleverPhD @NoisyLittleMonkey last edited by

        Yes bad for both.  You now have the name of a file acting as the name of a folder.

        As mentioned above - kill the use of index.php as your index "file" - just end in a slash.

        I know php treats these as routes/queries that then produce a page, but it can get things all messed up real quick.

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

          Oops thanks for all you answers, but what i should have said is: Is having "/index.php/" half way through the URI like so

          "http://www.example.com/someuri/index.php/more_uri/"

          bad for SEO/UX?

          To clarify if one searched on Google for more_uri and everything else was equal would the index.php in the middle of that URI be damaging to the ranking?

          Sorry about that 🙂

          CleverPhD 1 Reply Last reply Reply Quote 0
          • james.rose
            james.rose last edited by

            Whilst I don't think the index.php will have a direct impact on the SEO of your website it could easily have an indirect impact.

            As CleverPhD rightly points out it is a pain in the *** to remember and type that sort of URL.

            Not only for yourself but also for other websites and customers.

            The impact this has is hard to quantify... If I'm a site in your niche and want to link to you does this put me off? What if I link to the wrong site?

            Beyond that ending in index isn't as nice a user experience as just ending at the page name and ultimately its my belief that if you do whats best for the user you'll get good results from google.

            1 Reply Last reply Reply Quote 0
            • CleverPhD
              CleverPhD @NoisyLittleMonkey last edited by

              Correct - the duplicate issue is what will hurt you.  Whatever you go with, make sure the other variants 301 redirect to the "true" page.

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

                OK thanks, so index.php won't effect the SEO results. But not redirecting it, as both /index.php and / work correctly and go to the same php file, will result in the same content being registered twice by Google I'm guessing?

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

                  It is not "bad", although typical style would be that you can drop it as the extra characters are not needed and nobody likes extra typing - just ask Mr. Twitter.  He used brevity to become a billionaire!  Hmm .. I wish we could get Moz points for alliteration.

                  What is key is that you are consistent in your use of it.  If you want to use /index.php then go for it.  Just make sure every time you link to that URL in your menus or in articles when you Twiddle it of Farcebook it, you include the /index.php at the end as you do not want to have duplicate URLs for the same page.  I would also setup 301 redirects so that the / only version redirects to the index.php version.

                  All of that said, you are going to find that after the 104th time of Twiddling that URL, you will say, "Gee, it sure is a pain to type all those extra characters."  You will also find that when people are going to share your URLs they may have a tendency to drop the index.php as again, it is extra work.  If you have the redirect in place, you will be ok, but I say, why have you and everyone else do all that extra work to start with.  Just start with the URL ending in the slash and stay with that.  Have all other versions of the index page (index.php, index.htm or even a non slashed version, etc)  301 redirect to the URL that ends in a /.

                  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

                  • Dynata_panel_marketing

                    Are non-breaking spaces ( ) in keyword phrases bad for ranking

                    Hello all, I came across a tip for avoiding text orphans in responsive design by putting a non-breaking space between the last two words. While this works nicely, I was wondering if I did this inside of a keyword phrase, would it still rank equally as well? Or will it be viewed as separate phrases or terms? Thanks, Roman

                    Web Design | | Dynata_panel_marketing
                    0
                  • NachoRetta

                    Spanish website indexed in English, redirect to spanish or english version if i do a new website design?

                    Hi MOZ users, i have this problem. We have a website in Spanish Language but Google crawls it on English (it is not important the reasons). We re made the entire website and now we are planning the move. The new website will have different language versions, english, spanish and portuguese. Somebody tells me that we have to redirect the old urls (crawled on english) to the new english versions, not to the spanish (the real language of the firsts). Example: URL1 Language: Spanish - Crawled on English --> redirect to Language English version. the other option will be redirect to the spanish new version, which the visitor is waiting to find. URL1 Language: Spanish - Crawled on English --> redirect to Language Spanish version. What do you think? Which is the better option?

                    Web Design | | NachoRetta
                    0
                  • Jseddon92

                    How to split organic traffic for A/B testing

                    This might be a silly questions as I may be missing something completely obvious here, but we are completely new to A/B testing. Our site doesn't receive a phenomenal amount of traffic although we are looking to set up some A/B testing for our popular products. Is there a way to split organic traffic for a specific product page. I'm aware that we need to experiment which one performs better in Analytics but I'm unsure how to redirect 50% of the organic traffic.

                    Web Design | | Jseddon92
                    0
                  • JaanMSonberg

                    SEO strategy for UK / US websites

                    Hi, We currently have a UK-focused site on www.palmatin.com ; We're now targeting the North American market as well, but the contents of the site need to be different from UK. One option was to create another domain for the NA market but I assume it would be easier to rank with palmatin.com though. What would you suggest to do, if a company is targeting two different countries in the same language? thanks, jaan

                    Web Design | | JaanMSonberg
                    0
                  • Kingalan1

                    Are Carousels Bad for SEO?

                    My real estate web site was migrated form Drupal to Wordpress last July. The ranking have dropped a lot since migration. One of the things we changed is that we have added two carousels to the home page. Most of the text is below the carousels. Is this bad for SEO? Thanks,
                    Alan

                    Web Design | | Kingalan1
                    1
                  • proptiger

                    Redirects (301/302) versus errors (404)

                    I am not able to convincingly decide between using redirects versus using 404 errors. People are giving varied opinions. Here are my cases 1. Coding errors - we put out a bad link a. Some people are saying redirect to home page; the user at least has something to do PLUS more importantly it does NOT hurt your SEO ranking. b. Counter - the page ain't there. Return 404 2. Product removed - link1 to product 1 was out there. We removed product1; so link1 is also gone. It is either lying in people's bookmarks, OR because of coding errors we left it hanging out at some places on our site.

                    Web Design | | proptiger
                    0
                  • WillBlackburn

                    XML Sitemap that updates daily/weekly?

                    Hi, I have a sitemap on my site, that updates but it isn't a XML sitemap. See here: http://www.designerboutique-online.com/sitemap/ I have used some free software to crawl the site and create a sitemap of pages, however I think that if I were to upload the sitemap, it would be out of date as soon as I listed new products on the site, so would need to rerun it. Does anyone know how I can get this to refresh daily or weekly? Or any software that can do it? I have a web firm that are willing to do one, but our relationship is at an all time low and I don't want to hand over £200 for them to do one. Anyone with any ideas or advice? Thanks Will

                    Web Design | | WillBlackburn
                    0
                  • superTallDan

                    Duplicate Content for index.html

                    In the Crawl Diagnostics Summary, it says that I have two pages with duplicate content which are: www.mywebsite.com/ www.mywebsite.com/index.html I read in a Dream Weaver tutorial that you should name your home page "index.html" and then you can let www.mywebsite.com automatically direct the user to index.html.  Is this a bug in SEOMoz's crawler or is it a real problem with my site? Thank you, Dan

                    Web Design | | superTallDan
                    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
                  • 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.