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
-
Consolidating product pages during website migration
Hello, We are an e-commerce & content site undergoing a website migration and redesign in the coming months. We will be getting an entirely new website. Many of our URLs will be changing: Current URL setup: www.mysite.com/catalog/SKU12345/product-title-here
Intermediate & Advanced SEO | | katelynroberts
Future URL setup: www.mysite.com/catalog/product-title-here So we're aware we will be using plenty of 301 redirects to achieve this. Further to this though, we currently have a product page for each configuration of a product - for example, a single-sided bookmark has its own page and URL, and the double-sided version of the same bookmark has its own page and URL. In our site redesign, we are hoping to consolidate each of these instances into one product page where users can select single or double-sided and the price will update accordingly. The bookmark URLs would then go from:
_www.mysite.com/catalog/SKU12345/bookmark-single-sided _(call this URL A for simplicity)www.mysite.com/catalog/SKU67890/bookmark-double-sided (call this URL B) To (after migrating to the new URL structure for the new site, and the now-consolidated single- & double-sided product pages):
www.mysite.com/catalog/bookmark (call this URL C) What is the best way to make this transition without losing too much of our SEO value? I understand there is nearly always traffic loss with URL changes but I'd like to at least minimize the damage as best I can. We have backlinks and ranks for many product pages so I want to make sure we pass as much of this as we can. (And is this at all further complicated by the fact that URL A & B won't exist on the new site, and URL C doesn't exist on the current site? Does this impact the use of the 301 redirects and if so, how?) Are we better off to approach this page consolidation after the site migration and treat it as a separate project? This is something that is important to our user experience, and is definitely a change we want to make. Any advice is appreciated - thank you! I'm a fairly beginner-intermediate SEO so this is all somewhat new but I want to be able to at least convey some understanding to our developer of what we need to do. I was able to find this discussion (https://moz.com/community/q/merging-pages-and-seo) which describes a similar situation and solutions if we were just consolidating the pages but doesn't quite have the complicating factor of the entire site migration happening at the same time. Thanks so much!0 -
SEO's Structuring Your Work Week
Hi I wanted some feedback on how other SEO's structure their time. I feel as though I'm falling into the trap of fire fighting with tasks rather than working on substantial projects... I don't feel as though I'm being as effective as I could be. Here's our set up - Ecommerce site selling thousands of products - more of a generalist with 5 focus areas. 2 x product/merchandising teams - bring in new products, write content/merchandise products Web team - me (SEO), Webmaster, Ecommcerce manager Studio - Print/Email marketing/creative/photography. A lot of my time is split between working for the product teams doing KWD research, briefing them on keywords to use, checking meta. SEO Tasks - Site audits/craws, reporting Blogs - I try and do a bit as I need it so much for SEO, so I've put a content/social plan together but getting a lot of things actioned is hard... I'm trying to coordinate this across teams Inbetween all that, I don't have much time to work on things I know are crucial like a backlink/outreach plan, blog/user guide/content building etc. How do you plan your time as an SEO? Big projects? Soon I'm going to pull back from the product optimisation & try focussing on category pages, but for an Ecommerce site they are extremely difficulty to promote. Just asking for opinions and advice 🙂
Intermediate & Advanced SEO | | BeckyKey3 -
I'm invisible!
Dear all, Earl 2015 i launched www.taobao.nl. Its a platform that shows the products of chinese marketplaces in our local language (auto translated) and provides the option to pay in our local currency & methods. (i blocked all the auto translated product pages via http://www.taobao.nl/robots.txt) All content (category pages, general pages etc) are unique and written by us. In the past I've set up several websites and shops and i know it always takes time and effort to get a site to good positions, but i never experienced that my efforts did not pay of. Until now 😞 The url is not blocked by Google and i see a (very) limited amount of traffic in WMT & Analytics, but the site is >page 30 on its most important keyword 'taobao'. This, while the competition on this keyword is low in my country (google.nl). My main competitor (taobao.com.nl) seems to do worse on most SEO elements i was able to check, but they rank very well on 'taobao' and all related keywords. What could be the reason of this very poor ranking and what should i really adjust / improve?
Intermediate & Advanced SEO | | benhond
(besides backlinks: i'm working hard on that) Your input is deeply appreciated!! Sander1 -
Hreflang targeted website using the root directory's description & title
Hi there, Recently I applied the href lang tags like so: Unfortunately, the Australian site uses the same description and title as the US site (which was the root directory initially), am i doing something wrong? Would appreciate any response, thanks!
Intermediate & Advanced SEO | | oliverkuchies0 -
Help! Website Page Structure.
Hi there, I have a cupcake website; www.cupcakesdelivered.com.au To date, we have sold only regular cupcakes. Moving forward, we are about to start selling lots of different sorts of cupcakes and want to categorise them - i.e.; sport cupcakes, corporate cupcakes, movie-themed cupcakes etc. I am looking for a recommendation on how best to structure this in terms of pages / domains / subdomains etc, so as to best support SEO. Your help would be greatly appreciated!! Thank you, Laura.
Intermediate & Advanced SEO | | cupcakesdelivered0 -
Google does not favour php websites?
Hi there. An SEO company recently told me that google does not favour php development? This seems rather sketchy, I have not read that google doesn't favour this anywhere, did I just miss that part of SEO or are these guys blowing a little smoke?
Intermediate & Advanced SEO | | ProsperoDigital1 -
Best option for Affiliate links on your website?
Hello! I have a website which is completely affiliate based. What is the best option for the links on-page? Examples would be: affiliate.website.com/12901730?2=3532523=user12342901730?2=3532523=user?Whittie www.website.com/affiliate=user?Whittie=load-of-tracking=date=blah=blaH?blah And So on... Which look ugly as sin when you hover over the Anchor Text. Ideally I would like a 301 redirect to mysite.com/goto/affiliatename, which would then have a rel nofollow. This way I could also track the exit pages via Analytics too guess, which I've not currently got set up and i'm desperate for it to be done. Does this method effect anything on search engines though? I've seen mixed report, but going back to 2011 which is too long ago in the SEO world. Another option is to use the likes of "Bit.ly" or use another domain and host 301s on there? The new bit.ly integration from moz might come in handy here. Please advise on the subject, I really appreciate any help on this, as i'm at a brick wall. Thanks
Intermediate & Advanced SEO | | Whittie0 -
1 of the sites i work on keeps having its home page "de-indexed" by google every few months, I then apply for a review and they put it back up. But i have no idea why this keeps happening and its only the home page
1 of the sites i work on (www.eva-alexander.com) keeps having its home page "de-indexed" by google every few months, I then apply for a review and they put it back up. But i have no idea why this keeps happening and its only the home page I have no idea why and have never experienced this before
Intermediate & Advanced SEO | | GMD10