Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Sessions & Search Engines

by ahmad (Hermit)
on Apr 05, 2010 at 17:59 UTC ( [id://832869]=perlquestion: print w/replies, xml ) Need Help??

ahmad has asked for the wisdom of the Perl Monks concerning the following question:

Hello

In order to save language choice, I have used sessions CGI::Session module.

I present a 'Choose your language' page when you first enter the website then the user will be able to surf the website in his/her own language.

This has resulted in inability for search engines to spider the pages behind language choice page (they don't accept sessions/cookies).

The only solution that comes into my mind is keep passing ?lang=[lang] for every single page/action which will result in re-writing too many links and requires modification in too many files

Do you have a better solution??

Replies are listed 'Best First'.
Re: Sessions & Search Engines
by Corion (Patriarch) on Apr 05, 2010 at 18:05 UTC

    My proposed solution would be to not have such a "landing page" blocking me (or crawlers) from visiting the site at all. Look at how Youtube does it - they add an (annoying) element to the page asking for whether I would like to "fix" my location.

    I surf with cookies and Javascript disabled by default, so unless your site was the only site returned in a search and immediately relevant to my interests, I'd never go beyond your "Choose your language" thing.

Re: Sessions & Search Engines
by Herkum (Parson) on Apr 05, 2010 at 21:04 UTC

    Why are you not setting a default language when the user has not specified any language? Depending on how clever you are you can set a default depending on where the user is coming from.

      Yes I can, but this way search engines like google will only crawl the English version which is NOT what I want.

Re: Sessions & Search Engines
by lostjimmy (Chaplain) on Apr 05, 2010 at 18:22 UTC
    Figure out what the different search engine crawlers use for a user agent, then configure your web server to skip the language page for those user agent strings.

      I've had this idea, but this way I cannot make it crawl the content in multiple languages, I will have to set a default language only.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://832869]
Approved by zwon
Front-paged by redgreen
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-18 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found