Forum Moderators: coopster

Message Too Old, No Replies

id variable in url

Should I change the variable name?

         

Scaramanga

4:48 pm on Aug 6, 2003 (gmt 0)

10+ Year Member



I have a website for displaying paintings. All the details are stored in a database, and the pages are generated dynamically using php.

There are only 2 php files - the first file (thumbs.php)displays thumbnails of all the paintings, and the second file (fullsize.php) displays the fullsize version of the picture whose thumbnail was selected.

Each thumbnail has a link to fullsize.php, and the link also contains the id of the picture to be displayed

Thumbnail 1 links to fullsize.php?id=1
Thumbnail 2 links to fullsize.php?id=2
etc etc etc...

I want the details of individual paintings to appear in search engines - at the moment only the thumbnails page does so.

I've looked at quite a few other posts on this subject, and people appear to be suggesting that Google will ignore URLs that contain a variable named "id", because it thinks it represents the Session ID.

Does anyone know for definite if this is true? If so I'll change the variable name to something different.

c0nsur

5:07 pm on Aug 6, 2003 (gmt 0)

10+ Year Member



if so then do real session var!

if u get session var your url doesnt need to pass?id=blah

so it would be great then!

panic

5:13 pm on Aug 6, 2003 (gmt 0)

10+ Year Member



Or just find/replace $id with $photo or whatever variable you'd like.

-panic

c0nsur

5:18 pm on Aug 6, 2003 (gmt 0)

10+ Year Member



i suggest you to read about ranking stuff

cause many search engine doesnt wanna read after -->?

and there a function that changes domain.com/?id=value...
into domain.com/id/

now it seems to be a folder and not a var
so if u change id to a good keyword u may be ranked higher into google results!

panic

5:43 pm on Aug 6, 2003 (gmt 0)

10+ Year Member



I think c0nsur is referring to the Apache mod-rewrite module.

[httpd.apache.org...]

-panic

topr8

6:02 pm on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Does anyone know for definite if this is true?

yes, it is not true. do a search on google for ...

allinurl: "id="

you will find it does index pages of the type.
...php?id=...
...asp?id=...

now the question you didn't ask which is: how do they rank?

then many people here swear that they do better with url's that look static.
i think in non competitive areas it is not very important.

Scaramanga

6:04 pm on Aug 6, 2003 (gmt 0)

10+ Year Member



Thanks for your answers :)

I've read on other posts that Google is getting much better at spidering sites that contain links in the format url?variable, and I'd like to stick to this way of doing things if possible. It's nice and simple, and I'm not too familiar with session variables yet...

Changing the id variable's name would be extremely easy - it would only take me a few minutes to do a global find/replace and upload it.

But before I do this, I'd just like to know whether it'll actually make a difference in the all seeing eyes of Google.

panic

6:06 pm on Aug 6, 2003 (gmt 0)

10+ Year Member



It just looks cleaner not only to the engines, but to the user as well. It makes the appear as a well categorized and well structured site.

Scaramanga

7:00 pm on Aug 6, 2003 (gmt 0)

10+ Year Member



I'm not sure the average user cares what the urls are within a site, as long as they can navigate through it easily - i know if i'm browsing through a website I don't look at the url of every link before I click on it.

I accept that from a search engine perspective it might be better to use sessions and not pass variables through urls.

But just to satisfy my curiosity, would a link such as www.widget.com?id=7 be regarded by Google as being different to www.widget.com?anothervariablename=7

vincevincevince

9:29 am on Aug 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yes, never use?id= in your pages - pick something else as a variable name

thetog

9:41 pm on Aug 22, 2003 (gmt 0)

10+ Year Member



Official word from Google on ID= in URL

We relaunched our site, and saw that google had failed to reindex, or rather display any of our URL that contained the "ID=" After alot of discussions and pressure, they have finally sent back the following reply:
<snip>
So, at least they sorta admit the problem before we start recoding the site and content delivery system

Tog

[edited by: jatar_k at 6:35 pm (utc) on Aug. 23, 2003]
[edit reason] no email quotes, see TOS [webmasterworld.com] [/edit]

jatar_k

6:36 pm on Aug 23, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld thetog,

the key of the google quote was that they confirmed they may mistake a var as a session id and it is best practaice to stay away from any get strings that even look like session id's.

c0nsur

5:20 pm on Aug 28, 2003 (gmt 0)

10+ Year Member



no i wasnt thinking about apache rewritting module

i just meant $_SESSION['VAR'];
so theres no need to pass variable in the url!

Scaramanga

8:31 pm on Sep 8, 2003 (gmt 0)

10+ Year Member



It works!
I changed the variable name in the url from id to picture, and a couple of weeks later all my pages have been indexed. Proper Bo!

Thanks for the help :)