Is it bad to have /index.php at the end of a uri?
-
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?
-
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.
-
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
-
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.
-
Correct - the duplicate issue is what will hurt you. Whatever you go with, make sure the other variants 301 redirect to the "true" page.
-
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?
-
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 /.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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.
Related Questions
-
Directing a domain.com/BLOG to a different host
Hello,
Web Design | | SharonEKG
i cant seem to figure out how to approach this matter. we have a website and a domain setup in one place and we wanted to setup a blog for that website on a different hosting, what do i have to do to link between the two to make it so when a user type domain com /blog he will get to our blog that is hosted on a different hosting plan? with the blog hosting plan we received a temporary domain that does not expire but i have been told that if i redirect to that temporary domain it wont work correctly also, if we do manage to go through that process will accessing the blog will the URL show domain com/blog or will still show the temporary given domain? is my only option is buying a new domain and just link between the two? Thanks!0 -
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 | | NachoRetta0 -
Question Concerning HTML5/CSS Templates & Google Mobility Issues
Hi all, Looking for some kind of solution for a responsive update for a site and I am wondering if there are any templates (not Wordpress) that are both great SEO wise and would also pass muster with the impending Google update for responsiveness? I was looking at things like Canvas and Porto ( http://themeforest.net/popular_item/by_category?category=site-templates ) but can't find any discussion on whether or not these things have been addressed with any of these templates. If any of you have suggestions or other places to look for something that could possibly fit the bill (even if temporarily) I would be very appreciative. Thank you so much in advance!
Web Design | | Pixelwik1 -
A/B Testing.. Are you doing? how is it been? What do you think would be the best path for who is starting now?
Hey Mozers, One of my 2014 resolutions is to start doing A/B Testing, so far I have been following "best practices" and "common sense" when comes to website design, but I would like to go above and beyond. I was hoping a could get a few tips some of you that are already doing A/B testing. How is it been? Do you see a great ROI? What do you think would be best path for who is starting now? Any book or links you would recommend? Thanks
Web Design | | Felip30 -
Website spread over two domains - The Good,The Bad and the Ugly ?
Hi, I am wondering if the way I have set up our website site is creating more harm than good ? All our SEO efforts and content is located @ www.sparrowmakeup.com.au however our portfolio is located at www.make-up-artists.com.au. Questions ? Will Analytic bounce rates effect my SERP, as most people click on the portfolio link in the first 5-15 sec of landing on our page ?? Is there a better way of setting it up ? the reason I set it up like this in the first place was because we wanted a different look/theme for the portfolio. (using WP) Is there any other issues that this setup might have in the SEO / SERP department ?? Is there any benefits and how can I maximize on them (silver lining) Your help and experience is greatly appreciated. Regards Ed
Web Design | | EdsonGroupMedia0 -
Is it worth upgrading php to accomodate new WP version?
my client revisitors.com has a blog blog.revisitors.com that we cannot update to a newer WP version 3.5.1 because his php version apparently must be upgraded first. You cannot update because WordPress 3.5.1 requires PHP version 5.2.4 or higher. You are running version 5.1.6. according to client it would be potentially hazarardous for him to upgrade the php but we cant update or add new plugins because we arent running the current version of WP what is worse? i am responsible for his blog but i feel handicapped bigtime - at the same time i dont want him to do something that could wreck his site functionality either any suggestions? or advice here? thanks
Web Design | | Ezpro90 -
Hosting/design company that is both cheap and has a nice partner package. Any ideas?
I need to signon with a hosting/design company that is both cheap and has a nice partner package. Any ideas?
Web Design | | christinarule0 -
Whats the most effective way of targeting regional visitors, is it really just adding your city name at the end of your keywords?
Whats the most effective may of targeting regional visitors, is it really just adding your city name at the end of your keywords? The website i'm trying to optimize is f1plus.co.uk and the target city is aberdeen. I'm new to seo so any views or tips welcome. Thanks
Web Design | | jpc10040