View Full Version : .SHTML and search engines
phonesource
02-20-2004, 03:54 PM
Hi - I recently decided to clean up a lot of code by removing a big chunk of repetitve code from all my files and using a server side include to reference it. It works, but only if the files that do the including have .shtml endings (which my hosting provider said was necessary for the SSIs to work)
What's shtml and do search engines penalize us for using shtml endings (ie is the included code invisible to the engines or the shtml files invisible themselves)?
Thanks,
dave
phonesource.com
cyanide
02-21-2004, 01:13 AM
Hi,
The .shtml extension is necessary in order for the server to read the page as one and be able to parse those include files as one.
It's become quite the common practise nowadays.
I use it, but with .php
No, you won't get penalized
Hi Dave:
If you change all your page names from .html to .shtml they are all new pages as far as the search engines are concerned, and as far as links are concerned too,so it can be a bit of a problem. If a search engine has an html page of yours ranked for a term and a user clicks on the .html link when you have changed the pages to .shtml they will get a 404 error.
If you are hosted on an Apache server and have mod_rewrite installed, you can set it up so that server side includes will work with .html pages saving you the work of getting all your links changed etc.
cyanide
02-21-2004, 01:49 PM
Ahh, yes...
Further to Mel's post,
There's a couple things you can do through apache re-writes
Permanent re-direct and extension modification
The latter one, I don't have off the top, but for redirects...
Create a file called htaccess.txt with notepad and insert the following:
Redirect permanent /oldpage.html http://www.yourdomain.com/newpage.shtml
so atleast if your pages are in SE's index, they'll get re-directed to the new pages.
Just add additional lines for each page, you've changed
Upload the file to your root directory and change the name to .htaccess
You can also do the extension modification in the htaccess file, but rather than explain it all here there is a nice tutorial at:
http://www.avsfriendly.com/tutorials/htaccess.html#myssi
phonesource
02-23-2004, 10:18 AM
thanks to everyone for all the help - great forum!
- dave cook