5 Common SEO Mistakes with ExpressionEngine
ExpressionEngine's built-in search engine optimisation (SEO) features make it an excellent platform for marketeers. As an ExpressionEngine developer, I’m regularly approached by companies who share common SEO issues. The good news is they are all easy fixes and will enhance your SEO efforts.
1. Not creating 404 error rules
404 error pages tell search engines that the URL they have visited does not exist and shouldn’t be indexed.
ExpressionEngine's default URL structure means you could unintentionally be displaying pages, such as the homepage, when you really want to show a 404 error page.
Why is this bad? Search engines view this as duplicate content, resulting in lower rankings and traffic loss.
How to test
- Check Google Search Console. This provides information about all duplicate content Google has indexed on your site.
- Trial and error. Below i’ve listed some common examples to try. In each instance you should receive a 404 error
- www.yourdomain.com/abcdefg
- www.yourdomain.com/blog/category/abcdefg
- www.yourdomain.com/blog/P1/P1
How to fix
ExpressionEngine provides an easy fix, using a redirect variable which can be used within a conditional.
{redirect="404"}
2. Removing the index.php incorrectly
By default ExpressionEngine has ‘index.php’ in the URL structure. Its general accepted this is ugly, and makes the URL more complicated than it needs to be, so best practice is to remove the index.php using a 301 redirect.
If the index.php is removed without the 301 redirect will view this as duplicate content.
How to test
Using http://www.redirect-checker.org/ enter your domain name with ‘/index.php’ appended to the end, e.g. ‘http://yourdomain.com/index.php’, this should result in a 301 redirect response.
How to fix
Another simple fix, simply using the following snippet within your .htaccess file will resolve this problem.
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
3. www or not to www
Its vital your site is accessible with or without the ‘www’ prepending the domain name, but did you know that search engines will index both as separate sites. That means further duplicate content issues if you don’t use a 301 redirect from one to the other.
Whilst there are arguments for and against using the ‘www’, the most important choice is to pick one and stick with it.
To test, use http://www.redirect-checker.org/ and try both variations of your domain name. One should return with a 301 redirection response.
There are a lot of ways to solve this problem, I find the easiest way is to add a simple line within your .htaccess file.
To force the www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
To remove the www
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
4. Not Having Unique Title Tags and Meta Descriptions
Title tags and meta descriptions provide a concise explanation of the contents of the page and commonly used in search engine results pages to provide a preview for the page.
As with content it’s important for these to be unique.
How to test
Google Search Console can help identify duplicate titles and descriptions.
How to fix
There are many ways to fix these and your developer will be best to advise you on this. There are a number of add-ons which can help such as SEO Lite (https://devot-ee.com/add-ons/seolite) and SurgeEO (https://devot-ee.com/add-ons/surgeeo).
5. XML Sitemaps
XML sitemaps provide search engines with a list of all the pages on your site, or at least those you want to be indexed. Due to the dynamic nature of ExpressionEngine, you often have content which will change regularly, and will want to keep search engines up to date with this.
How to test
Visit your website appending /sitemap.xml to the domain name, e.g. http://yourdomain.com/sitemap.xml - You should see a rather ugly list of page URLs.
How to fix
If your content doesn’t change regularly, using a static XML sitemap generator may work for you (https://www.xml-sitemaps.com/).
You will likely want your sitemap to update when you publish new content. There are a few add-ons available depending on your specific scenario: