SEO & Drupal

A Primer

by Lauren Caple

What is SEO?

"the process of maximizing the number of visitors to a particular website by ensuring that the site appears high on the list of results returned by a search engine."

Search Engine Optimization

AKA appeasing the Google gods

What is SEO?

  • Relevant, well written content
  • Accessible website
  • Effective user experience
  • Properly written, clean, consumable code

Search Engine Optimization

Why it Matters

Supporting public facing websites means we're representing the organization as a whole.

We're a part of an organization

As with branding, how we present ourselves on our sites impacts all other sites on the uw.edu domain.

Why it Matters

Alt and title tags, readable image names, and well written content means happier users

It leads to a better user experience

Properly implemented meta tags makes it easier to share content on social media

Users find what they're looking for faster

Why it Matters

Both internal and external searchability improves

Search engines like it!

You have more control over how the image of your unit is portrayed on Google, Bing, etc.

Best Practices

Content is the bulk of SEO. Poorly written content riddled with typos that's not relevant to the site will hold a site back.

Content Startegy

  • Avoid typos
  • Keep it concise and informative
  • Properly divide your copy with headings and sections
  • Pick a style or voice for the site and stick to it

Best Practices

Images

  • Use the alt attribute to describe your images
  • Use the title attribute when appropriate to give relevant info
  • Give all images hyphenated, readable names.
    ex: uw-husky-mascot.jpg facebook-icon.png

Note: hyphens are read like spaces by spiders. Underscores are not.

Best Practices

Technical

  • Use readable, hyphenated URLs
  • Set your metatags for search engines and social media
  • Give users the ability to add title and alt tags
  • Setup your robots.txt file, even on your dev/staging environments (to stop spidering)
  • Set page title tags to something unique on every page
  • Properly implement HTTP redirects for moved pages
  • Setup a sitemap.xml to get your changes spidered faster

Best Practices

Code-related

  • Write clean, semantic code
    • ex: <article>, <header>, <footer>, <address>
    • ex: .social-media-icon{} vs .smic01{}
  • Avoid Drupal's auto-generated "div soup"
  • Use coding best practices for CSS, Javascript & HTML
  • Don't use deprecated code, keep JS libraries up-to-date
  • Load JavaScript at the bottom of your documents when possible

Drupal

Makes our job easier

There is a whole slew of SEO-helpful Drupal modules out there. Many are "Set and Forget" and once you implement them they do their job in the background.

Drupal

Modules of note

  • Meta tag (set meta tags by content type, allow the user to edit per-node)
  • Metatag Open Graph
  • Pathauto
  • Redirect
  • Global Redirect (make 301 notices of redirects)
  • Pathologic
  • XML Sitemap
  • File Entity (make alt and/or title image fields required)

SEO Crisis Averted

Simple setup can make it not feel like this:

When someone has an issue with SEO results

Made with Slides.com