Page extensions - search results problems
For 3 months now I have been having issues with my page extensions. For many years I used .php and then 3 months ago switched to Apache. I made the mistake of re-naming all of my pages with the extension of .shtml and recently learned that I should have used .html so I again re-named all of my pages to .html.
All along for 3 months I have been noticing issues with search results for the website. .php and .shtml pages are showing up mainly on google search results but I am now seeing all these page extensions on search engines and it is too confusing and messed up! So I have two questions for anyone who can enlighten me on what can be done to fix this search engine problem.
1) Is it possible to create a way for all .html, .php, and .shmtl pages to be read regardless which page extension someone clicks on?
2) I am looking at the google web developing information but is there something that I can do to get google to remove the old page extensions (.php, .shtml) and read the new .html pages?
Someone previously suggested a 301 redirect to me but I learned that was not what I needed because my website address/domain/url did not change.
Megan posted this at 14:26 — 24th November 2014.
She has: 11,421 posts
Joined: Jun 1999
I don't understand why the 301 redirect won't work. You should be able to find a regular expression that will redirect all the *.php and .shtml extensions to .html. The number 301 means permanent redirect. It's a way to permanently point visitors and search engines to the new version of the page. It can work for a top-level domain, but also pages within your site.
Megan
Connect with us on Facebook!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.