Does cgi negatively affect pagerank?
December 3, 2005 2:03 PM   Subscribe

Will converting a home page from shtml to cgi negatively impact its pagerank?

I'm contemplating making the above change for a friend, who requires the ability to pass a parameter to her home page. She has heard somewhere that changing to a cgi script will torpedo her ranking. I've been unable to confirm or rule this out using google. Any insight?
posted by Manjusri to Computers & Internet (6 answers total)
 
Best answer: If the usual URL for the home page is

http://www.example.com/

and the webserver is fetching the index.shtml/.cgi automatically from that, then changing it definitely won't make a difference to your ranking. Google (or anyone else) has no way of knowing what is really behind that URL, whether it's index.shtml or index.cgi or albatross.phalange.

If, however, the URL is

http://www.example.com/index.shtml

then it's possible that changing it will have an effect; I don't know for sure.
posted by chrismear at 2:27 PM on December 3, 2005


Oh, and if Google does have it in the index as "http://www.example.com/index.shtml", you could always set up that URL to give a "301 Moved Permanently" message and redirect to the new URL (preferably just "http://www.example.com/" to save this kind of bother in future). Google should then pick up the change.
posted by chrismear at 2:30 PM on December 3, 2005


Oh, oh, is it the dynamic aspect that's the main worry? As in, URLs that have a query string, like

http://www.example.com/legumes.cgi?peanuts=nutty

Google does treat these a bit differently:
Your pages are dynamically generated. We're able to index dynamically generated pages. However, because our web crawler could overwhelm and crash sites that serve dynamic content, we limit the number of dynamic pages we index. In addition, our crawlers may suspect that a URL with many dynamic parameters might be the same page as another URL with different parameters. For that reason, we recommend using fewer parameters if possible. Typically, URLs with 1-2 parameters are more easily crawlable than those with many parameters.
(from a FAQ in the Google help center)

If that's what your friend is worried about, you could use URL rewriting to convert the URL into something more friendly like

http://www.example.com/legumes/peanuts/nutty
posted by chrismear at 2:37 PM on December 3, 2005


I'll... I'll be quiet now...
posted by chrismear at 2:44 PM on December 3, 2005


If it's an Apache server, read the section of the Apache manual on mod_rewrite
posted by winston at 4:53 PM on December 3, 2005


Or you can just have Apache treat that page differently. For example,

<Files "index.html">
SetHandler cgi-script
</Files>

This will probably be faster than using mod_rewrite, but unless her site is heavily trafficed then it won't make a difference.
posted by The Supreme Dominar at 5:58 PM on December 3, 2005


« Older Cultivating Mad Science   |   Buying Christmas Trees in Boston Newer »
This thread is closed to new comments.