• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Do search engines index a site with a "?query" in the URL?

Canuckkev

Doctor Hexagon
NLC
What I want to do is be lazy and do the index.php?page=blah so I only have to make a blah.inc.php to include. But, I heard search engines do not index pages like this...I did a quick look through google, and saw a few "questionable pages" (urls with a ? in them). But, does anyone know anything on the matter? Do you not get as good a ranking?

Or would it be preferrable to use "http://domain.tld/index.php/blah" I think that looks nicer, but does anyone know if that will cause problems with browsers and whatnot, because it is a bit of a funny url...

Does anyone know? And don't you think "index.php/blah" looks much nicer than "index.php?page=blah"?

My code I will use...:
PHP:
$script = $_SERVER["PHP_SELF"];
$script = str_replace("/index.php/","","$script");
if(file_exists("$script.inc.php")){
include("$script.inc.php");
}
else{
include("index.inc.php");
}

NEVERMIND, I found a useful site: http://www.websitepublisher.net/article/search_engine_friendly_urls/

Anyone with dynamic sites should read this!
 
Last edited:
Umm, i dunno if you know this, but search engines dont use a billion pages, they use a database, which is alot easier to index sites with.
 
He he...I know...I mean when they spider your page.

I read a while ago that if you have a site that uses links like this:

http://domain.tld/index.php?page=home
http://domain.tld/index.php?page=email
http://domain.tld/index.php?page=links
http://domain.tld/index.php?page=blah


That the spider will not crawl those links...only to plain old "file.ext" page.

So, then I was going to link like:

http://domain.tld/index.php/home
http://domain.tld/index.php/email
http://domain.tld/index.php/links
http://domain.tld/index.php/blah

But according to that article, your page might still not be picked up.

So, I am using the "ForceType" apache directive. My links are now:

http://domain.tld/index/home
http://domain.tld/index/email
http://domain.tld/index/links
http://domain.tld/index/blah

This method is more valid, the only drawback is it depends on an apache server. Thanks for your help, Google!
 
Sorry, misread your post. Thought you were going to make a search engine. Now i see you are just trying to get all your pages picked uip by engines.
 
Back
Top