Reviving an old PHP website to fix SEO Issues

March 26, 2021 - Søren Alsbjerg Hørup

In 2007 I made a PHP website tailored for IE6 (yippee) that shows local rentable apartments. The site has been running flawlessly without any code changes now nearly 15 years.

Recently the client called me and asked why “his site was loosing rank position on Google”.

Naturally, my instinct told me the following:

  • Site was optimized for IE6, that is, not being valid HTML5.
  • Site is still not using SSL
  • Site does not follow modern SEO.
  • Site is not mobile friendly.

I took a deep breath and FTP’ed to the site to pull out all the PHP code such that I could create a local PHP development and get the site up and running.

First issue that was hit was my local PHP installation were a version 7.7 and the site was unable to run due to several deprecated functions, such as MySQL, resulted in missing functions and an un-renderable site.

The site was implemented using PHP 5.x and has never been updated since.

After a downgrade of PHP I got the site to work and found several things that needed to be fixed before the HTML markup was SEO friendly. A simple SEO check revealed several things:

  • Missing H1 headlines

    • Much of the site was made with div’s and tables.
  • Internal links with dynamic URL parameters

    • Some of these are unavoidable and needs to be fixed by e.g. nofollow.
  • 301 redirect of www. vs non-www domain.

    • non-www needs to be redirected to www. with a 301.
  • Language markup errors

    • The Markup needs to be updated from 4.01 Transitional to 5.0 and ensure all markup errors has been fixed.
  • Missing SSL encryption

    • Google now penalizes sites that don’t use SSL. Obviously, SSL needs to be enabled.
  • Missing viewpoint tag

    • Site looks horrible on mobile browsers.

Instinct was right yet again. :-)