Forum Moderators: open

Message Too Old, No Replies

Please help with <title> problem

         

tama

6:34 pm on Aug 7, 2006 (gmt 0)

10+ Year Member



I'm having a problem with my page title. The title is the same for every page, basically "sitename.com". That is how it appears in the header.php file.

In looking at the source code, I also see the original programmer used javascript to make the title in the title bar show the "document.title", which matches the h1 tag for that page. It works perfectly in the title bar of the browser. BUT

The problem: Search engines see only the title as it appears in the header.php file, which is simply "sitename.com" So I have thousands of pages that show up as "sitename.com" in the search engine results. Obviously, I'd like to have each page individually titled in the search engines. I'm sorry I am not a programmer but I think I need a javascript code that I can include in the header file, which will ask the title to be the same as the page "document.title" for that page.

The original programmer moved on to bigger clients and will no longer work on this site. If anyone can help with the code for this I would appreciate it.

Fotiman

9:25 pm on Aug 7, 2006 (gmt 0)

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



Search engines won't execute JavaScript code, no matter where you put it. You won't be able to solve this problem with a JavaScript solution. Instead, you'll need to implement something server side (with PHP) to correct this situation.