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

                  • johncurlee

                    Best practice for multilanguage website ( PHP feature based on Browser or Geolocalisation)

                    Hi Moz Experts I would like to know what does it the best practice for multilanguage website for the default language ? There are several PHP features to help users to get the right language when they come from SEO and direct; present the default language by browser language, by gelolocalisation, etc. However, which one is the most appropriate for Quebec company that try to get outside Canada ? PRO and CONS. Thank you in advance.

                    Web Design | | johncurlee
                    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
                  • airnwater

                    Decreasing Page Load Time with Placeholder Images - Good Idea or Bad Idea?

                    In an effort to decease our page load time, we are looking at making a change so that all product images on any page past page 1 load with a place holder image.  When the user clicks to the next page, it then loads all of the images for that page. Right now, all of the product divs are loaded into a Javascript array and loaded in chunks to the page display div. Product-heavy pages significantly increase load time as the browser loads all of the images from the product HTML before the Javascript can rewrite the display div with page-specific product HTML. In order to get around this, we are looking at loading the product HTML with a small placeholder image and then substituting the appropriate product image URLs when each page is output to the display div. From a user experience, this change will be seamless and they won't be able to tell the difference, plus they will benefit from a potentially a short wait on loading the images for the page in question.  However, the source of the page will have all of the product images in a given category page all having the same image.  How much of a negative impact will this have on SEO?

                    Web Design | | airnwater
                    0
                  • markadoi84

                    URLs with Hashtags - Does Google Index Them?

                    Hi there, I have a potential issue with a site whereby all pages are dynamically populated using Javascript.  Thus, an example of an URL on their site would be www.example.com/#!/category/product. I have read lots of conflicting information on the web - some says Google will ignore everything after the hashtag; other people say that Google will now index everything after the hashtag. Does anybody have any conclusive information about this?  Any links to Google or Matt Cutts as confirmation would be brilliant. P.S. I am aware about the potential issue of duplicate content, but I can assure you that has been dealt with.  I am only concerned about whether Google will index full URLs that contain hashtags. Thanks all! Mark

                    Web Design | | markadoi84
                    0
                  • iprosoftware

                    Footer Links Good or bad?

                    Hi Can anyone answer this question confidently, I know Google is moving away from lots of links within the footer.  However we specialise in websites for the travel industry and having a link to all the areas at the footer can be quite handy.  Our websites complete this automatically. Here is an example where due to design of the site the links don't quite fit well, so we need to change anyway.  But before completing the work I wondered if there was a better way to do this. http://www.dreamvillasitaly.com/ Many thanks Andy

                    Web Design | | iprosoftware
                    0
                  • sftravel

                    Custom 404 Page Indexing

                    Hi - We created a custom 404 page based on SEOMoz recommendations.  But.... the page seems to be receiving traffic via organic search.  Does it make more sense to set this page as "noindex" by its metatag?

                    Web Design | | sftravel
                    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.