There's a website I'm working with that has a .php extension. All the pages do. What's the best practice to remove the .php extension across all pages?
-
Client wishes to drop the .php extension on all their pages (they've got around 2k pages). I assured them that wasn't necessary. However, in the event that I do end up doing this what's the best practices way (and easiest way) to do this? This is also a WordPress site.
Thanks.
-
Awesome! Thanks for clarifying that.
I'm assuming I'd us a rule similar to below. Is that right/
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$
-
If it's for cosmetic reasons then they will likely be causing themselves SEO issues (there is some PageRank leakage with 301 redirects). My suggestion would be to wait until the next site redevelopment and implement extension-less filenames so that the technology doesn't affect the file names in the future. At that time you can implement 301 redirects from the old names with the extensions to the new. It's fairly simple to do in the htaccess file as long as you keep the filename the same (eg /some-filename.php to /some-filename).
The only valid reason to change at this time is if you are experiencing indexation issues and since that is not the case...
-
THey are just seeing sites without them and also would like to not have them.
That's about it, really. Nothing is broken or having issues being indexed.
-
SEs read .php files so this change probably isn't necessary. If you did, you might establish rewrite rules in .htaccess and add 301 redirects. But again, why mess with the file extensions? Are they having indexation issues?
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
-
How do I redirect my old PHP website to my new Java website?
Please could you help? My old website is written in php. I've created a new design of the website in Java. I'll be using the same domain name though. example.com and I'd like to pass my link juice to my new redesigned website. When I turn the domain name to point to my new website how do I make sure pages that are ranked in google that don't exist on my new website transfer 301 from my old website to a similar page on my new website. Old Website Example example.com/bootcampuk.php New Website Example example.com/bootcamps.jsp Many Thanks, Rob
Intermediate & Advanced SEO | | puamethod0 -
URL Change Best Practice
I'm changing the url of some old pages to see if I can't get a little more organic out of them. After changing the url, and maybe title/desc tags as well, I plan to have Google fetch them. How does Google know that the old url is 301'd to the new url and the new url is not just a page of duplicate content? Thanks... Darcy
Intermediate & Advanced SEO | | 945010 -
I'm facing something weird about my domain
Howdy... I'm facing something weird about my domain : proudlylived.com
Intermediate & Advanced SEO | | MasdrSE
there's another domain points to my domain in search results which is : <cite class="_Rm">www.animaisfotos.com</cite> I went to check if it's 301/302 redirect and it shows that there isn't any redirection at all it just shows 200 Status, Now I don't know what is happening, and whatever it's i want to cancel it because it shows the second domain instead of mine in search results . any suggestions ?0 -
Site's disappearnce in web rankings
I'm currently doing some work on a website: http://www.abetterdriveway.com.au. Upon starting, I detected a lot of spammy links going to this website and sort to remove them before submitting a disavow report. A few months later, this site completely disappeared in the rankings, with all keywords suddenly not ranked. I realised that the test website (which was put up to view before the new site went live) was still up on another URL and Google was suddenly ranking that site instead. Hence, I ensured that test site was completely removed. 3 weeks later however, the site (www.abetterdriveway.com.au) still remains unranked for its keywords. Upon checking Web Master Tools, I cannot see anything that stands out. There is no manual action or crawling issues that I can detect. Would anyone know the reason for this persistent disappearance? Is it something I will just have to wait out until ranking results come back, or is there something I am missing? Help here would be much appreciated.
Intermediate & Advanced SEO | | Gavo0 -
Ecommerce SEO - Indexed product pages are returning 404's due to product database removal. HELP!
Hi all, I recently took over an e-commerce start-up project from one of my co-workers (who left the job last week). This previous project manager had uploaded ~2000 products without setting up a robot.txt file, and as a result, all of the product pages were indexed by Google (verified via Google Webmaster Tool). The problem came about when he deleted the entire product database from our hosting service, godaddy and performed a fresh install of Prestashop on our hosting plan. All of the created product pages are now gone, and I'm left with ~2000 broken URL's returning 404's. Currently, the site does not have any products uploaded. From my knowledge, I have to either: canonicalize the broken URL's to the new corresponding product pages, or request Google to remove the broken URL's (I believe this is only a temporary solution, for Google honors URL removal request for 90 days) What is the best way to approach this situation? If I setup a canonicalization, would I have to recreate the deleted pages (to match the URL address) and have those pages redirect to the new product pages (canonicalization)? Alex
Intermediate & Advanced SEO | | byoung860 -
Whats the best way to revive a directory that was 301'd and now I want to remove that?
Last year i 301'd one of my directories on my site, pointing everything to a different directory. Long story short I am going to sell this product line again and would like to just remove the 301 to that original directory, but I am reading that the 301s are also cached in most browsers for a long time. Has anyone successfully done this and if you did what was it that you had to do? Thanks Mike
Intermediate & Advanced SEO | | SandyEggo0 -
I am working SEO on a website that has 2 pages for different variations of a keyword.
I have run into a situation where a website has 2 pages for different variations of a keyword. I personally like to use 1 page and make it powerful for a variety of variations of that keyword. Unfortunately for the site I’m working on, using only one page is not an option. Here is an example: They have a page for “Alex Miley Cameras” and then they have a page for “Alex Miley Cell Phones”. On the first one they want to rank for Alex Miley & Alex Miley Cameras. For the 2<sup>nd</sup> they want to rank for “Alex Miley Cell Phones”. My concern is will Google be indecisive on which page to rank for the keyword “Alex Miley” since they both contain this word. Also, will it affect any of the other words and spread the juice making each page weaker. I would appreciate advice on how to rank these pages each separately for their keywords and not have to worry about any confusion from Google. I can’t change the structure of the site. I only have access to the Meta info and page content. Thank you for your help
Intermediate & Advanced SEO | | SEOPresident0 -
Removing Duplicate Page Content
Since joining SEOMOZ four weeks ago I've been busy tweaking our site, a magento eCommerce store, and have successfully removed a significant portion of the errors. Now I need to remove/hide duplicate pages from the search engines and I'm wondering what is the best way to attack this? Can I solve this in one central location, or do I need to do something in the Google & Bing webmaster tools? Here is a list of duplicate content http://www.unitedbmwonline.com/?dir=asc&mode=grid&order=name http://www.unitedbmwonline.com/?dir=asc&mode=list&order=name
Intermediate & Advanced SEO | | SteveMaguire
http://www.unitedbmwonline.com/?dir=asc&order=name http://www.unitedbmwonline.com/?dir=desc&mode=grid&order=name http://www.unitedbmwonline.com/?dir=desc&mode=list&order=name http://www.unitedbmwonline.com/?dir=desc&order=name http://www.unitedbmwonline.com/?mode=grid http://www.unitedbmwonline.com/?mode=list Thanks in advance, Steve0