Technical guide to Drupal SEO

Search engine optimization can mean many things, and for Drupal-based websites many of those things require technical expertise and skills as well as knowledge of some Drupal-specific caveats which marketing people are often not aware of. As I work with Drupal every day, and our company focuses on organic traffic growth, I’ve spent a lot of time over the last couple of years researching and experimenting with various ways of making Drupal sites SEO friendly. I finally realized that I actually should put together a mini-guide for our team to use.

Here’s a revised version of our Drupal SEO best practices guide intended to be used by developers and site builders while creating and maintaining Drupal based websites. I’m sharing it with hopes that someone else finds this useful, even though it’s just a bulleted checklist.

Please note that I’m going to focus only on technical aspects, and such things as keyword research, content optimization, links etc. are outside of the scope of this guide. It should be applicable to both Drupal 7 and Drupal 8 with some minimal variations.

Drupal SEO – top 12 tips

1. URLs

(We use: Clean URLs settings and Pathauto modules).

  • Make sure all Drupal URLs have user and SEO-friendly (no node/NODE-ID) aliases.
  • Make sure to set clean and consistent patterns for all nodes, pages, users, taxonomy terms etc.

2. Sitemap

(We use: XML sitemap module).

  • Make sure to have right settings for each content type, views and taxonomy terms (exclude duplicate content, broken pages, pages with not original content, thin content).
  • Exclude unpublished nodes and post-login content.
  • Have it auto-updated and submitted to Google and other search engines.

3. Meta tags

(We use: Metatag and additional modules for views, Open Graph, JSON-LD etc. including Schema.org Metatag, Metatag: Views, Metatag: OpenGraph) for all content that needs to be optimized.

  • Make sure to have right settings for standard title and description meta tags (default settings for each content type, optimize manually for high priority content pieces).
  • Canonical URLs (helps to avoid duplicate content due to case-sensitivity, page variations being used in A/B testing etc.).
  • Add Open Graph meta tags (can keep same settings/defaults as for standard meta tags + images that follow the requirements for size and format).
  • Add JSON-LD structured data.
  • Make sure to use Noindex (not robots.txt) for content that should be hidden from search engines.
  • Make sure to check and fix duplicates (may require tweaking settings for views/list pages with pagination, fixing some one-off pages/terms manually etc.).

4. Taxonomy system

(categories and tags).

  • Think about content structure and the ways different content types are related (e.g. blog, videos, podcasts, news may be related by certain topic).
    • Develop a site-wide taxonomy system and make it match keywords for SEO.
    • Tag/categorize all content. This will:
      • Automatically generate taxonomy pages – add meta tags to them and add them to the sitemap.
      • Allow you build views (blocks or pages) and link the content (e.g. suggested content) – which good for UI/UX and also for SEO by better content linking and creating pages with a variety of highly relevant content grouped by certain topic/keyword.

5. Nodes/Entities

  • Make sure to make nodes and node pages for all individual pieces of valuable content (e.g. each video or podcast can be a node with description/transcript, PDFs like whitepapers or reports can have respective pages with short descriptions and download links, partners can be added as separate nodes instead of being one giant HTML list, online magazine can be converted to a web version and added to the website as a series of articles etc.). This will allow for the content to show up in:
    • Site search.
    • Organic search.
    • On taxonomy pages, dynamic lists/views etc.
  • Make sure to include those pages in the sitemap, add metatags, include in the taxonomy system.

6. Redirects

  • Make sure to have right settings for www and non-www variations.
  • Make sure to have right settings for http and https variations
  • Soft 404s and optimized redirects (Look into: Redirect and/or global redirect modules).
  • Avoid redirect loops and long redirect chains.

7. Mobile-friendly design and UI

  • Make sure to use a nicely written responsive Drupal theme.
    • Make sure to regularly test your website for cross-device and cross-browser compatibility (Look into: using tools like browserstack.com).
    • Check Google Search console for “Mobile friendly” issues.

8. Site speed

  • Optimize images – resize and compress images before uploading, enable responsive images, lazy loading (We use: Image Lazyloader, ImageAPI Optimize, Picture modules).
    • Minify css, js, HTML (We use: Drupal core performance settings or Minify module).
    • Aggregate js and css (We use: Drupal core performance settings or Advanced CSS/JS Aggregation module).
    • Gzip (on server/CDN).
    • Use CDN (We use: CDN module) for static assets such as images, scripts, styles (e.g. Cloudfront).
    • Cache static resources (server response headers).
    • Use testing tools e.g. https://gtmetrix.com, https://www.webpagetest.org or https://developers.google.com/speed/pagespeed/insights for further suggestions.
    • Some advanced methods may include async loading of fonts, optimizing small images using font icons and sprites, critical css, optimizing the way you load scripts and styles (removing render blocking js and css), http2 etc.

9. AMP

(AMP module)

  • Enable for dynamic content only (blog, articles, news).
    • Get the reporting right (Google Analytics and Google search console, read up about proper Google Analytics settings, Client ID and session stitching).
    • Make sure it’s not hurting you as it doesn’t work same/well for everyone.
    • Get it as close to non-AMP version as possible (navigation, suggested content, CTAs etc.).
    • Make sure thumbnail images work.
    • Make sure pages validate (monitor Google Search console for reports).

10. Cleanup of content and comments for deactivated users.

  • Make sure there’re now 404s (reassign comments and posts to another account).

11. Make sure there’s no critical/valuable content loaded asynchronously

by JavaScript (e.g. Ajax views, custom JS loading content via APIs). This content may not be displayed to some of the users (e.g. those who have issues with JavaScript) and may not be indexed by web crawlers and bots.

12. Drupal SEO checklist module

https://www.drupal.org/project/seo_checklist try and see if it’s helpful for you.

General advice:

  • Make sure website code is not crappy 🙂
    • Use tools that help with reporting and detecting issues (server errors, broken links, crawl errors, duplicate content etc.) like Google Search console, semrush.com.
    • Use reporting e.g. Google Analytics to monitor what’s happening with organic channel.
    • H1s, alt attributes etc.
    • Try get into Google News (need AMP, Google News sitemap) if your website qualifies.
    • Look into cloud hosting with CDN to further improve loading times.

Thanks for taking the time to read such a lengthy post. I’ll try to elaborate on some of the topics in more detail in my future posts. Meanwhile feel free to ask questions in the comments section below.

Useful links:

More articles about SEO

2 thoughts on “Technical guide to Drupal SEO”

  1. Hello, this is a great article on Drupal SEO. As we all know that Drupal is little bit less SEO friendly than WordPress. But, the tips you have provided can be really useful for making the Drupal website SEO ready. With these SEO tips, one can make a drupal website that can rank better than the WordPress website.

Leave a Reply

Your email address will not be published. Required fields are marked *