Search code examples
phphtmlheadertitlefooter

Title tags in body (php)


I currently have the title tags in the footer of my site. This is because the title is dynamic, and if I place it in the head then it's blank, as the title content doesn't get loaded until the body.

My question is, does it matter, SEO wise, that the title tags are in the footer as opposed to the header?


Solution

  • I currently have the title tags in the footer of my site.

    That is not valid. Title tags must be in the <head> section:

    Every HTML document must have a TITLE element in the HEAD section.

    Also, it will probably give real-world problems. I have never seen title tags used in the page's footer, and I expect they are going to be ignored by search engines there.

    You should change the underlying architecture of your PHP script so you can know the title when the page starts.

    Reference: