Drupal SEO Pitfalls and How To Avoid Them

Blog
Posted on
Succesful SEO in Drupal

Today’s SEO is about more than quality content. You need to provide a user-friendly experience that keeps visitors engaged. Getting it right with Drupal involves many well-known modules, but also some lesser-known quirks and pitfalls you can — and should — avoid.

In our recent talk at DrupalCon Amsterdam 2019, Brent Gees and myself discussed how to discover issues that affect ranking factors with your Drupal site. We also demonstrated how to fix these problems and prevent them. The main purpose of all these changes isn’t just about improving search engine ranking. It’s also about improving the experience for visitors that keeps them coming back.

Watch the Webinar and learn about Great SEO in Drupal by Default, by Dropsolid.

Speakers: Wouter De Bruycker, SEO Specialist, and Brent Gees, Drupal Architect.

Overlooked Drupal SEO pitfalls

In refining the out-of-the-box SEO functionality of our install profile, Dropsolid Rocketship, we discovered there are so many strange ways Drupal configuration can harm organic search positions, depending on how you use it. 

Here’s a simple example of how we’re improving SEO by design and preventing lots of the potential pitfalls right from the start while delivering a better user experience in the process. Drupal has a habit of generating nodes that are publicly available by default, even if these separate pages don’t really make sense. A taxonomy term used to categorise news items would result in a separate page for each category. And these pages aren’t always useful endpoints for users. In Rocketship, we resolved this by auto-redirecting the user to a filtered news overview, based on the category that they clicked on.

Next, let’s look at another issue that’s quite common and how to resolve it.

The GDPR v Cookies red herring and how to avoid it

Accurate analytics are crucial for optimizing search engine positioning. We noticed an issue across a number of client websites where there was a big traffic spike on Google Analytics. Yet, something looked rather suspicious. The number of unique visitors increased, but it was all direct traffic. They weren’t coming from search and they weren’t referred from another link.

Google Analytics suddenly showing a huge increase in traffic

Search engine optimization is an on-going process of monitoring and managing your sites to prevent issues from affecting SEO ranking factors. You don’t want to wait until you conduct a Drupal site audit to discover a cornerstone page is dropping in SERP position (Search Engine Results Pages). 

We figured out it all started with an update to the EU Cookie Compliance Module to ensure it complied with the latest GDPR regulations. 

Here’s what was happening: if the users continued to browse the website, without accepting the cookie settings, they continually looked like NEW users. Cookies were cleared on each new page request, which caused Google Analytics to create new cookies on each page view as if it was a fresh visit. In short: 1 session of 10 page views suddenly resulted in 10 sessions of 1 page view each.

We solved this issue by whitelisting the Google Analytics cookies AND modifying our Google Analytics tracking setup so IP-addresses are anonymised. By anonymising the IPs we comply with GDPR regulations and by whitelisting the cookies we don’t lose valuable session information on each pageview.

Example of whitelisted cookies

The new changes in the module required you to make this correction, but if you didn’t realize the change happened… it’s one of those small issues that would cause a lot of trouble for anyone who needs accurate analytics. Among the hundreds of other modules that you might be using across many client or project sites, these small snags could turn into poor-quality data, false conclusions about cause and effect, and hours of wasted effort.

To the moon with Dropsolid Rocketship!

After years as a developer building websites, my interests started veering more to the strategic side with customers. Issues with search engine positioning came up with every customer. They had great websites, but no visitors. I enjoy working on these problems because you can see the results quickly. It shows up in their analytics but also in increased business opportunities and leads, and return on their investment.

Dropsolid Rocketship helps our developers to be more effective. There are a lot of small things that make a difference, and having them built right into Rocketship means you don’t have to start from scratch each time. This eliminates errors and makes project execution faster. Now we have more time to focus on SEO strategy with our customers.

The Dropsolid Rocketship install profile includes the essential features most of our sites need. The sites are set up right, right from the start, eliminating the chance for human error. We’re making it more user-friendly on the front end; giving it a better developer experience in the back-end and at the hosting level. Meanwhile, Rocketship improves the experience at the point where many potential customers will discover you: visiting from a search engine.

This holistic perspective is part of our vision on integrated Open Digital Experience Platforms that our CEO, Dominique De Cooman, introduced at DrupalCon Amsterdam 2019. If you missed out on his presentation, you can always watch it online together with all other talks by our Dropsolid specialists

SEO pitfalls in Drupal and how to avoid them

Watch the recorded webinar

Download the e-book

 

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.