A client has asked me to tailor the content of their homepage based on how the user got there from Google. His example is something like:

If a user searches Google for Cars in Barcelona, then the homepage has content based on cars in Barcelona.

I can't see how this would be possible - would I need to have 20 or so different content blocks for the homepage to cover all of the areas they would like to promote? How would I then get Google to display the correct content based on the search and how would I get Google to index them all?

Bit confused by this one, so any help would be greatly appreciated!


  • Can you use a server-side programming language? If yes, which one(s)?
    – Pekka
    Commented Nov 1, 2011 at 10:57
  • @Pekka Yes, PHP
    – SammyBlackBaron
    Commented Nov 1, 2011 at 11:01
  • I believe this might hurt your SEO.
    – JackWilson
    Commented Nov 1, 2011 at 12:51

2 Answers 2


In case you are using AdSense program you cold make Landing page for each campaign but that will not cover all possible solutions probably

generic solution is to use UrlRefer and read from it "q" parameter. Depending on keywords used for search you cold load different wording for your page. Just ask person who requested this for which words you will need what content and make different templates which you will switch depending on "q" variable... also you will need "default" page which will be complete with all words you want to use so google can index it properly... not easy task but wort to try.

Maybe you should try to convince guy to use AdSense program and different landing pages

  • Thanks for this, I'll query the referrer for the keywords. Regarding AdSense landing pages - would they be 'physical' new pages and not just dynamically changing the homepage content?
    – SammyBlackBaron
    Commented Nov 1, 2011 at 14:27
  • You can make single page with content which will be changed depending to parameter which came through url. But consider rewrite url so it is more SEO optimized, also link those page some how within website so google robot can index them, aside from fact you could use AdSense..... BTW if you are using google analytic for instance you can already fetch report which will give you insight how people have found particular page in your website through google, and not just for home page
    – Milan Jaric
    Commented Nov 2, 2011 at 5:05

Tell your customer that he will lose any search positions he has. Google says that this kind of cloaking is against the rules for webmasters.

You need to build all the pages first and hopefully Google will index them. If this were implemented, people will see different pages based on their search query. This is how internet works :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.