Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Dynamic Webpage Titles for multiple pages

How do I make each page unique?

12:47 am on Oct 6, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:June 20, 2007
votes: 0


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.


5:56 am on Oct 9, 2007 (gmt 0)

Senior Member from MZ 

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 9, 2005
votes: 0

On one side you want to select title randomly and at the same time you want to attach specific titles for specific pages.

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

10:24 am on Oct 9, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:June 20, 2007
votes: 0

Thanks for your reply, I'll certainly look into your points.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members