Drupal SEO pitfalls. How to avoid them?

Blog
Posted on
Drupal SEO-pitfalls. How to avoid them

SEO optimization for business impact

Advanced SEO techniques for businesses involve much more than standard SEO optimizations and high-quality content. Digital experiences that captivate your website audience depend greatly on CMS-specific optimizations.

When it comes to Drupal, SEO optimization seems simple enough at first sight. A majority of the most popular Drupal modules have been designed with SEO in mind and, as a result, they are relatively easy to optimize. However, Drupal does come with its own particular and sometimes less well-known features that can have a significant impact on your website’s Google search rankings. 

In this e-book, you will discover ten technical, Drupal-specific SEO tips. We share the most common SEO pitfalls in Drupal and explain their potential impact on your business. We also share our tips and solutions to help you counter these problems.

In this blog you will learn more about 10 SEO pitfalls in Drupal:

  1. Too many redirects
  2. Indexable internal search
  3. Indexed test environments and test pages
  4. Public entities 
  5. All pages should be an entity
  6. Assets blocked by robots.txt
  7. Module overload
  8. Security issues
  9. Crawling vs. indexing 
  10. Incorrect analytics data 

Tip #1: Too many redirects

Problem

Redirects are more of a curse than a blessing - at least where SEO is concerned. A buildup of otherwise harmless consecutive redirects can have a major negative effect on your website loading times and your SEO score.

If Googlebot (Google’s web crawler) visits a web page that returns a redirect status code, it will automatically add this page to the bottom of its ‘to visit’ list for that particular website. This isn’t much of an issue for smaller websites, but large environments will soon feel the hit of much slower indexing. The conclusion is straightforward: redirect chains are not search engine-friendly.

Solution

Avoid going down the easy route of uncommenting the most obvious options in .htpasswd. Instead, think about the logical flows you want to create with your URLs and adjust your code accordingly to minimize redirects.

LinkResearchTools
Example

Tip #2: Indexable internal search

Problem

By default, internal search result pages of a website are often indexable by search engines, unless you explicitly rule out this option in your CMS settings. This implies that Google and other search engines can index your web pages that show nothing but a list of search results and, subsequently, display these pages in their search engines. In theory, this shouldn’t be much of an issue. In practice, however, pages with aggregate search results are considered by search engines to be pages with inferior content, resulting in a near-certain hit to your SEO score.

Solution

In Drupal, you can anticipate this SEO problem by installing the metatag and metatags_ view module and submodule, respectively. They offer you the possibility to change indexation settings for your search result pages. This hides your search result pages from the view of Googlebot and other web crawlers.

When using a node for your search pages, install the metatag module and add the field to your content type.

Page settings
Page settings
Advanced settings

Tip #3: Indexed test environments and test pages

Problem

Development and staging environments are often crawlable and indexable by search engines. Temporary content is also prone to accidental indexing by crawlers.

This usually happens as a result of configuration issues, minor mistakes or simply time pressure on the development team. Fortunately, this issue is as easy to resolve as it is to overlook.

Obviously, development and staging environments are better off without indexing, to avoid the risk of being detected by the general public or the competition.

Solution

Test pages in live environments can be unpublished or removed from indexing using the metatag module.

Test environments can be password protected using the .htpasswd file.

Example of test environments
Advanced settings
Sign in pop up

Tip #4: Public entities

Problem

By default, entities are publicly available through their own unique URL. For example, a team member module might generate a public node for each team member, whilst these are only used for the team overview page and the website might not need a subpage for every team member. In Drupal, the URLs for these entities look as follows:

https://mysite.com/node/42, https://mysite.com/taxonomy/term/42, etc.

This results in low-value pages that are fairly thin on content - not an ideal situation for indexation by Google and other search engines. Redundant pages are a waste of resources,including bandwidth, crawl budget and database storage.

Solution

You can prevent irrelevant entities from being accessed by your website visitors. In Drupal, the rabbit_hole module does an excellent job at this.

Tip #5: All pages should be an entity

Problem

Certain types of web pages are usually generated based on other content. These pages are not an ‘editable node’ in the back-end of a website. Home pages and overview pages are typical examples of this. It can be difficult to make SEO-related changes to web pages that aren’t editable nodes. Examples of items that are difficult to edit are meta tags and XML sitemap configuration for page inclusion.

Solution

The solution is twofold:

  • Use the Drupal layout builder to create a home page.
  • Use Paragraphs in combination with the block_field or overview_field module to add blocks to the page.
Layout builder
Paragraphs

Tip #6: Assets blocked by robots.txt

Problem 

Certain website assets, including favicons and images, may be located inside a folder that is hidden from view of web crawlers through the robots.txt file. This way, search engines are unable to view and analyse web pages in the way a human website visitor would.

Solution

Make sure Google has access to the full web page that you would like to be indexed. This can be done by adding all relevant website assets (including images, icons and favicons) in a publicly accessible folder that isn’t blocked by your robots.txt file. In addition, you should keep an eye on Google Search Console for any notifications on blocked resources.

Robots.txt

Tip #7: Module overload

Problem

Modules are a blessing to work with and they solve a variety of problems. Nevertheless, there are limits to any module-reliant CMS, including Drupal. An excess number of modules can slow down your website significantly by downloading multiple resources to your visitors’ web browsers. A sluggish website is detrimental to your SEO score and has a negative impact on your visitors’ user experience.

Solution

Prevention is better than cure. Avoid modules that are too complex or not strictly necessary on your environment. If you are using a module as a shortcut or quick fix, looking into alternative solutions might be a valuable alternative.

In addition, you should check your website for modules that are no longer used on your website. You can verify this using the unused_modules tool.

Tip #8: Security issues

Problem

Security issues can have a profound impact on your website’s SEO score. A classic example is the public file upload issue. Allowing public file uploads can result in lower organic traffic when set up incorrectly. If files can be uploaded to your website without any form of verification or CAPTCHA, this could result in thousands of files being uploaded by spammers. If these files are subsequently indexed by Google, your SERP ranking will decrease.

If the spam on your website catches Google’s attention, you might become subject to a so-called manual action by a Google employee. The website page in question (or even your entire website) could get downgraded in its search engine’s result rankings. This usually leads to a decrease in organic search traffic, with serious consequences for your website and your business.

Solution

Use a CAPTCHA module to exclude spam from your public file uploads. Recaptcha and simple_recaptcha are amongst the most popular options for Drupal. 

You could also consider placing private files outside of Drupal’s web root folder.

Example of a legitimate website containing links to illegal torrent files

Tip #9: Crawling vs. indexing

Problem 

Contrary to popular belief, blocking a page (or folder) using the robots.txt file or through adding a noindex directive are two distinctly different things.

In short, robots.txt instructions impact crawling, whilst noindex directives (using a meta tag) impact indexing. This implies that Google and other search engines can occasionally stumble upon a link on a particular website that refers to a page that is blocked by robots.txt, and still index it. The result will most likely show up in search results as a snippet that doesn’t contain any title or description, since Google will not be able to read it. Check the real-life example:

The code comments show that “strange homepage URLs” were the reason behind the Drupal.org dev team decision to block Google from crawling that particular page. This proved ineffective, however.

Solution

The rule is simple:

  • Robots.txt instructions set rules for crawling.
  • Noindex instructions set rules for indexing.

If you use the robots.txt and noindex instructions correctly, avoiding indexing issues should come easy

Een door Google geïndexeerde pagina op drupal.org
Robots.txt op Drupal.org schept duidelijkheid

Tip #10: Incorrect analytics data

Problem

Uncontaminated data are crucial for all SEO-related decision-making. Sudden traffic spikes and drops in your Google Analytics dashboard might indicate technical issues. Always be ready to investigate this further before you start making important business decisions based on flawed data and incorrect assumptions. An example:

Further analysis of the case quickly revealed that something was amiss. The number of unique visitors had spiked, but all site visits had resulted from direct traffic. This was a clear warning sign: in general, traffic spikes are the result of search queries or external referral traffic.

It quickly transpired that the suspicious traffic was caused by a cookie compliance module update. After the update, each pageview would start a new session as long as website visitors didn’t click the ‘accept’ button in the cookie pop-up notification.

Solution

A simple configuration change in the Google Analytics settings proved sufficient to correct the error that had been caused by this otherwise harmless module update. In general, it is good practice to check all analytics settings on a regular basis. This will allow you to detect problems at an early stage and keep your data clean.

Page views

Conclusion

Competitive SEO strategy 

Using the above strategies, you can take on a majority of Drupal’s SEO pitfalls. Anticipation is the key: in-depth analysis and smart configuration of settings can avoid the bulk of technical SEO-related problems further down the road. You should also bear in mind that every business case and website is unique, which implies that your SEO strategy should be bespoke as well. A comprehensive SEO audit will be able to kickstart your website optimization track. This way, you can generate added value and competitive advantage for your business.

Our Dropsolid SEO experts are available to help your business grow.