Welcome to WebmasterWorld Guest from 188.8.131.52
I have hundreds of "search result" pages on my site that I have mod-rewrited into Google-friendly urls. Nice.
However, each page is titled in a very generic way:
eg. Cookies Page 1, Cookies Page 2, Cookies Page 3, etc.
As I can't really grab keywords from the page content (they are just random results), I want to be able to pull a selection of keywords from a seperate file and print them as a permanent Title on each page:
eg. Cookies Page 1 --> Jam Cookies, Choc Cookies, Yummy Cookies
eg. Cookies Page 2 --> Yummy Cookies, Yellow Cookies, Choc Cookies
eg. Cookies Page 3 --> Jam Cookies, Yummy Cookies, Yellow Cookies
These titles would be taken dynamically and randomally from a list of titles included from somewhere for each page, but they are permenant for each page (they don't change after a page refresh so that Google sees them the same way each time it slurps).
Does anyone know some code or a script somewhere that could easily setup a batch of titles and have the page generator grab a title for each Cookie Page?
I know this doesn't make sense but hopefully someone sees my vision.
It might be very hard unless you write your own code.
there could be different ways to handle this. for example if these pages are generated from google search results you can grab the SEARCH QUERY / STRING and make that title of your page it will be very relevant.
otherwise write a function which parse the body of the page and then make its title by grabbing words from <h1></h1> tags in your page. That will be very good for google too. Because your aim is just not to select titles but titles which matches your page's body. Only then you will get some score from SEs.
If you stores these results in some database then it is very easy. Add a column of TITLE in your table and each time you store a page's body store its title too. Then read it from table and make the title