Converting .html to .shtml & Maintaining Google SERPS?

Discussion in 'Search Engine Optimization' started by swoop, Feb 22, 2008.

  1. #1
    I have a website with static (html) pages that ranks well in the SERPS. I would like to add SSIs to the pages, which (at my hosting provider) requires that I change the pages to shtml.

    What is the best way to do this and still maintain my good ranking in the search engines?

    Thank you.
     
    swoop, Feb 22, 2008 IP
  2. astup1didiot

    astup1didiot Notable Member

    Messages:
    5,926
    Likes Received:
    270
    Best Answers:
    0
    Trophy Points:
    280
    #2
    Why rename the files? Just add the below code to your .htaccess file to make SSI work in *.html files, this must be done in every .htaccess file in each directory you wish to do this in.

    
    AddHandler server-parsed .html
    Options +Includes
    
    Code (markup):

    I think you need a web hosting provider that has some better technical knowledge of their web servers :D
     
    astup1didiot, Feb 22, 2008 IP
  3. digitalspace

    digitalspace Banned

    Messages:
    347
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    can we add asp code in .html pages?
     
    digitalspace, Feb 22, 2008 IP
  4. swoop

    swoop Active Member

    Messages:
    469
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    90
    #4
    Thank you ssandecki. That htaccess trick will be very useful!
     
    swoop, Feb 23, 2008 IP
  5. nfd2005

    nfd2005 Well-Known Member

    Messages:
    295
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    130
    #5
    If you must change the extension, you can do 301 redirects in your htaccess like so:
    This will redirect any .html file to .shtml. May be conflicting if you have .html files with your .shtml files.



    htaccess is only available on apache servers. You can however get your hosting provider to change file mime types so that .html files will run as asp, but I would not recommend doing so. Many times it will put a strain on the server.
     
    nfd2005, Feb 23, 2008 IP
  6. sultanofseo

    sultanofseo Notable Member

    Messages:
    9,930
    Likes Received:
    405
    Best Answers:
    0
    Trophy Points:
    265
    #6
    i use godaddy linux hosting and that what they told me that i needed to do in order to use SSI. those people don;t know much i guess. i did some research and uploaded an htaccess file with the proper code and used include tag on the htm pages and it works like charm.

    here's what you need to do if you are running your hosting on linux server. make an htaccess file with the following code:

    then use this include tag on your webpage

    i use .htm but you can change that to html if you want
     
    sultanofseo, Feb 23, 2008 IP