URL change extension to .php from .htm
-
I am looking at changing the platform of an established (7 years) site to PHP based.
Currently most of the URLs have the file extension .htm (“x.com/filename.htm” ) with some URLs being indexed as directory URLs (“x.com/directory/” feeding from “x.com/directory/index.htm”)
So I am considering two options
-
A. Changing just file extensions & create 301 redirects, (x.com/samefilename.htm” -> “x.com/samefilename.php”) and for directory URLs (“x.com/samedirectory/index.htm” -> “x.com/samedirectory/index.php”)
-
B. At the same time taking the opportunity to change the file hierarchy to be more user / seo friendly by changing all URLs to directory URLs – this would be a more extensive redirect than just changing the file extension.
I am interested in what risks / impact would there be of this and the questions I would like some help with are:
- Are there any short term risks to rankings with a filename extension change like this?
- Should an exercise like this be staggered or is it ok to carry out the site-wide change in one go?
- Does a more extensive filename and structure redirect like in option B above introduce more risk than just changing to the .php extension or would the search engines consider this the same?
- For the directory URLs do I even need a 301 redirect after changing index.htm to index.php or will the Search engines not even recognise a change (indexed URL will remain the same)?
Your opinions on the above questions and any other advice / experience you can share would be much appreciated.
Thanks,
Adrian.
-
-
Istvan makes a number of good points and Matt Cutts has certainly alluded to a loss of some link juice when using 301's, although Google's official line is that there is no loss. I'd not seen the 15% number before, which is certainly high enough to be discernible above the 'noise'.
I support his contention that, in terms of getting existing inbound links repointed, it's best to focus on the few high value links and then look for new links driven by quality content. This has the double benefit of cleansing some of the now-devalued link types, whilst appealing to Google's measurable preference for 'fresh' links.
-
Hi Adrian,
with a 301 you lose aprox 15% of link juice (don't remember who gave that exact number, but i still have that in my mind )
So basically if you can change the links that you have control of, it will help. with other links... try to focus more on gaining new link partnerships. the 301 will lose some of the link juice, but new partners will push the link diversity and will help you more.
I hope it helped and good luck ;-),
Istvan
-
Thanks Istvan and Alan for the responses.
On the subject of incoming links - I can change internal links and inbound links from other sites I control however the vast majority of links will still point to the old page location so my follow up question is just how serious is this link juice loss due to the 301 and is this a serious enough reason to not do the change and keep the locations as they are now?
-
Thank you Alan
-
Istvan is give a good answer, i would add one thing, make sure all your internal links point to the new urls, dont rely on the 301, as as Istvan stated, they will leak a little link juice.
-
Hi Adrian,
We had a similar problem not as long ago (changing the website extension from .html to .aspx). What we have experienced is, that the website traffic and rankings went down for aprox. 1-2 week, then it came back up without any problem.
I would suggest to go for all change at one time instead of going with partial rewrite, then again some partial rewrite. (Before you put it alive, test all your links! check for broken links and make sure the redirects are right)
After the website deploy you should resubmit a new sitemap in GWT.
The 301 should be done, so after resubmitting your sitemap in GWT you will not face any duplicate content issue.
The negative part: you will lose some of the link juice thanks to the 301. If you have the possibility contact the webmasters who are already linking to your website and ask them kindly to resolve the URL issue (at least for the highest authority links you have gained in time).
I hope that helped,
Istvan
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
-
Broken URL Links
Hi everyone, I have a question regarding broken URL links on my website. Late last year I move my site from an old platform to Shopify, and now have broken URL links giving out 4xx errors. When I look at Moz Pro>Campaigns>Insights>links, I can see the top broken URL links, however there is a difference if copy & paste URL directly from Moz Pro and by Export CSV file. For example below, If I copy and paste links direct from Moz Pro, it has the “http://” in front as below: http://www.thehairhub.com.au/WebRoot/ecshared01/Shops/thehairhub/57F3/1D8F/D244/C675/E27D/AC10/003F/35AD/manic-panic-colours.jpg But when I export the list of links as an CSV file, the http:// is removed. www.thehairhub.com.au/WebRoot/ecshared01/Shops/thehairhub/57F3/1D8F/D244/C675/E27D/AC10/003F/35AD/manic-panic-colours.jpg Another Example below: By copy & paste URL direct from Moz Pro
Technical SEO | | johnwall
http://thehairhub.com.au/Shop-Brands/Vitafive-CPR/CPR-Rescue By export CSV file.
thehairhub.com.au/Shop-Brands/Vitafive-CPR/CPR-Rescue Which one do I use to enter into the “Redirect From” field in Shopify URL Redirects? Do I need to have the http:// in front of the URL? Or is it not required for redirects to work? Kind Regards, John Wall
The Hair Hub0 -
Adding a parameter to the URL / URL Stracture
Dear Community, I would like to ask a question regarding url structure. We are struggling with shorting urls and we thought to add a "parameter" to the url. Example: domain.com/product**/a/** or domain.com**/a/**product/ Current url structure: domain.com/product/ So we go after and short url contains "/a/" and find the category we want. Is this going to harm our SEO strategies? Any idea is welcome.
Technical SEO | | geofil0 -
Changing site URL structure
Hey everybody, I'm looking for a bit of advice. A few weeks ago Google sent me an email saying all pages with any text input on them need to switch to https for those pages. This is no problem, I was slowly switching the site to https anyway using a 301 redirect. However, my site also has a language subfolder in the url, mysite.com/en/ mysite.com/ru/ etc. Due to poor work on my part the translations of the site haven't been updated in a long time and lots of the pages are in english even on the russian version etc. So I'm thinking of just removing this url structure and just having mysite.com My plan is to 301 all requests to https and remove the language subfolder in the url at the same time. So far the https switching hasn't changed my rankings. Am I more at risk of losing my rankings by doing this? Thanks!
Technical SEO | | Ruhol0 -
Big SEO Changes
Firstly, this is quite extensive so thank you to anyone who answers some or all of the below! So this is quite a lengthy ordeal, and I'm going to start by saying that I'm no SEO expert (yet). I've paid for SEO for years and only on the odd occasion has it made any real difference. It has come to the point now where I've spent so much money on SEO over the years with practically no benefit that I can't afford to do it anymore, so I am teaching myself. So, back in July my website was hacked for a total sum of three weeks. My SEO/Hosting company at the time didn't do anything about it, let the hack sit there and didn't even take the site offline. It just so happened that at the time I was changing over to a new site at the time anyway, so I launched the new site (completely different in structure to the old one), did all of the relevant 301 redirects, and my traffic hasn't recovered since. I have gone from around 100-150 daily visits to 0-10. The descriptions, keywords, alt image tags, h1 & 2, meta data, etc. is all much better (a lot of it was empty on the previous site) on the new site than it was on the previous site so I was assuming it would be better, but it isn't. Anyone got any suggestions as to why this might be? Here are some specific questions: Canonical Problem? My site is ecommerce and lists some products in several categories, that has resulted in a high duplicate content rate. Is it expected/accepted by google that this would be the case for an ecommerce website or do I need to sort out some serious canonical urls to fix the issue? The site structure of my website could also be a problem, but I'm not qualified enough to know for sure. If you view a product/sub-category, then remove the category section of that link, the product will still appear. I don't know if this structure is good or not? i.e. if you click both links below, the link will appear all the same. http://thespacecollective.com/space-clothing/nasa-and-space-t-shirts http://thespacecollective.com/nasa-and-space-t-shirts Is this a problem for SEO? Duplicate Product Tag Problem? I have many duplicate product tags appearing on many products, should these be blocked in the robots.txt? i.e. http://thespacecollective.com/space-memorabilia/space-flown/apollo-11-flown-cm-meteorite-acrylic http://thespacecollective.com/space-memorabilia/space-flown/apollo-11-flown Site Code Structure When choosing the template I would use for my website I did not stop to consider if the code was SEO friendly, this on my part was due to my ignorance on the subject. Is the site structure SEO-friendly or is it hindering my efforts? Website: http://thespacecollective.com Again, thank you to anyone who takes the time to read/care about the issues facing a newbie. My only option now is to learn SEO myself (which is well overdue), so any advice/answers are appreciated!
Technical SEO | | moon-boots0 -
Should I change or redirect this URL?
Happy Friday everyone! I just noticed that one of our Attorney Profile's url's is wrong. We used to have someone named "Dana Fortugno" as our Family Law attorney, but when he left, (over two years ago) we hired "Scott Finelli." The person who setup the site, just changed the information on the page not url. So instead of it saying "http://www.kempruge.com/scott-finelli-jd-llm/;" it says "http://www.kempruge.com/dana-fortugno-jd-llm/." I'm considering taking all the content on the page with the wrong url, copying it to a new page with the correct URL and 301 redirecting (what would now be a blank page) to the new page with the correct URL. Is this the best way to handle this? Also, I don't believe there are many SEO concerns regarding the pages specifically. The profile pages aren't what we rank for in any of our Family Law related keywords. I am worried about having a completely blank page that just 301 redirects as looking bad to google, but not sure if it would? As always, thank you for your time and any assistance you can provide. Ruben
Technical SEO | | KempRugeLawGroup0 -
Making URLs automatically clickable
Hi all, I have a PHP function which i use to make all links clickable. Problem is, if some one writes a link in a a-tag, the URL inside the href value is made clickable. Not good. Can someone perhaps help me with the issue? Function: function makeClickableLinks($text)
Technical SEO | | rasmusbang
{
$text = preg_replace('/<//', ' $text = preg_replace('(
)', '
', $text);
$text = preg_replace('!((https?://www.|https?://|www.)(([a-z0-9-]+.)+[a-z]{2,6})(/\S+|/)*)!ie', '"[".shortenurl("\1")."]("".(strtolower('$2'))"', $text);
$text = str_replace('( <a href',="" '<a="" $text);<br="">$text = str_replace(')" target', '" target', $text);
$text = str_replace('):" target', '" target', $text);
$text = str_replace(')..." target', '" target', $text);
$text = str_replace(').." target', '" target', $text);
$text = str_replace(')." target', '" target', $text);
return $text;
}</a> <a href',="" '<a="" $text);<br="">Pleeeeease heeelp 🙂 Can't fix it on my own - been at it for ages. -Rasmus</a>0 -
Change in url structure - added category page
I have recently started an e-commerce website and have now changed the url structure and added another level to my category pages. So where it before was www.website.com/shirts it is now www.website.com/clothes/shirts. So I added the clothes category (just an example) before the shirt category and am now finding that the old url is still found in the search index and is still live on my site. How could this be? I use wordpress and simply change the urls in the backend. The products are still under www.website.com/product/blue-shirt-123 so they won't be affected but I suppose it now means I have duplicate category pages? So my question is: Should I 301 the the old category page (www.website.com/shirts)to the new url (www.website.com/clothes/shirts). And how can the old url still be live on my site? If this was a bit unclear, please let me know. Appreciate your replies!
Technical SEO | | bitte0 -
Should i change the url name for serp plural from singular to plural please advise
Hi, I have an established ecommerce site online since 2008 when I set it up I did not really think about it and i called it mywidget. However the traffic is minimum 10 times higher for plural and all the long tails ie bluewidgets, cheapwidgets are all plural. I rank very well on the widget but not widgets - I know there is more competition but still it would be best to have the most commonly used phrases in the url. Now I have registered mywidgets should i transfer my shop to mywidgets and setup a permanen redirect 301 for all the products url and categories. I'm guessing I will be negatively impacted in the short term but in the long term it should be worth it. Would you agree sorry its a massive decision for me and any help would be much appreciated. Many thanks
Technical SEO | | reallyitsme0