drupal 7 search engine optimisation

27
DRUPAL 7 SEO How to structure a Drupal website for strategic Search Engine Optimisation Peter Macinkovic | @inkovic on Twitter Drupal Melbourne Meetup | July 2016

Upload: peter-macinkovic

Post on 07-Jan-2017

80 views

Category:

Marketing


0 download

TRANSCRIPT

Page 1: Drupal 7 Search Engine Optimisation

DRUPAL 7 SEOHow to structure a Drupal website for strategic Search Engine

Optimisation

Peter Macinkovic | @inkovic on Twitter

Drupal Melbourne Meetup | July 2016

Page 2: Drupal 7 Search Engine Optimisation

WHAT MAKES SEO IN DRUPAL DIFFERENT?

Drupal is Flexible: You are not ‘locked in’ any particular information architecture

Out of the Box, Drupal 7 is lacking: There are a few ‘must-have’ modules for most Drupal installations

Drupal is Creative: You can solve a lot of common SEO problems in a couple of different ways

Page 3: Drupal 7 Search Engine Optimisation

ENABLING CLEANS URLINDEXING AND CRAWLABILITY

• By default, URLs are querieseg: http://www.example.com/?q=node/83

• Clean URLs helps Google Spiders crawl your URLs more cleanly than queries

Source: http://drupal.stackexchange.com/a/54570/21701

Reference: https://www.drupal.org/getting-started/clean-urls

• Required: mod_rewrite enabled in Apache• For nginx and other platforms, refer to

https://www.drupal.org/node/717772

Page 4: Drupal 7 Search Engine Optimisation

ENABLING CLEANS URLINDEXING AND CRAWLABILITY

URL: example.com/admin/config/search/clean-urlsURL: example.com/admin/config/search

Page 5: Drupal 7 Search Engine Optimisation
Page 6: Drupal 7 Search Engine Optimisation

MANAGING URL ALIASESINDEXING AND CRAWLABILITY

• By default, each node has a hard referenced system URLeg: /node/12

• URLs can be Aliased to match a node for a semantically correct url

• Path, the default module is limited• Pathauto makes URL configuration easy

Source: http://example.com/admin/config/search/path

Reference: https://www.drupal.org/project/pathauto

Page 7: Drupal 7 Search Engine Optimisation
Page 8: Drupal 7 Search Engine Optimisation

MANAGING URL ALIASES: PATHAUTOINDEXING AND CRAWLABILITY

• Using Tokens to create semantic URL structureseg: /articles/[node:title]

• Parent would likely be a View• eg: /articles could be a views page

that lists all articles in order of publish date

Source: http://example.com/admin/config/search/path/patterns

Page 9: Drupal 7 Search Engine Optimisation

drupal.org/project/clean_markup

Page 10: Drupal 7 Search Engine Optimisation

GLOBAL REDIRECT

Page 11: Drupal 7 Search Engine Optimisation

drupal.org/project/clean_markup

Page 12: Drupal 7 Search Engine Optimisation

CURING ‘DIVITIS’ IN DRUPAL

• Default markup rendered is lousy: Drupal 7 has a nasty habit of wrapping everything in 2+ divs and slapping on 3+ classes on everything

• Blocks by default render the block title as a h2: Hierarchy of heading tags in HTML is really important for SEO. Unchanged Blocks divert attention from the content of the page.

• Modular solution or Theme level: Pick the appropriate solution, whether it is overwriting a tpl.php file or using a module to change defaults.

• Compatible with Display Suite: Configuring a bundle is almost identical to configuring the fields of a content type.

Page 13: Drupal 7 Search Engine Optimisation

MANAGING HTML OUTPUTCLEAN BLOCKS MODULE

• Clean Markup: Choose the wrapper elements of HTML for Panels, Blocks etc.

• Useful for sitebuilders to control output

• Removes the need to customise at the theme levelReference: https://www.drupal.org/project/clean_markup

Page 14: Drupal 7 Search Engine Optimisation

MANAGING HTML OUTPUTCLEAN BLOCKS MODULE

• Clean Markup: Choose the wrapper elements of HTML for Panels, Blocks etc.

• Useful for sitebuilders to control output

• Removes the need to customise at the theme levelReference: https://www.drupal.org/project/clean_markup

Page 15: Drupal 7 Search Engine Optimisation

drupal.org/project/clean_markup

Page 16: Drupal 7 Search Engine Optimisation

MANAGING HTML OUTPUTOTHER TIPS

• Theme Each Content Type Optimally: Try to render fields that are semantic and schema.org compliant. Do not leave this to the content author.

• Theme Common Elements: Default blocks template, views templates etc.

• Make sure it is fast: Cached everything for anonymous users. Use Boost, Varnish, Aggregation on Javascript and CSS.

Page 17: Drupal 7 Search Engine Optimisation

MANAGING METATAGSMETATAG MODULE

• Meta Tags are important: Page Title and the first h1 tags are considered the most important onsite elements for keywords

• Smart Defaults: Using tokens and pattern matching to create verbose

• Customise on a Entity-by-Entity Basis

Reference: https://www.drupal.org/project/metatag

• Alternative: metatag_quick, page_title

Page 18: Drupal 7 Search Engine Optimisation

drupal.org/project/metatag

Page 19: Drupal 7 Search Engine Optimisation

MANAGING METATAGSCONFIGURING DEFAULT METATAGS

• Configure Smart Defaults: By default, all 404 pages have their canonical URL set to root URL

• Configure Your Nodes: Make sure that you have verbose defaults for Page Title, Description etc.

• Contextual Awareness: Do edge case exceptions. i.e. if term reference or view page = 0 results, reference parent.

• 1 result? Canonical the result itself!

Page 20: Drupal 7 Search Engine Optimisation

MANAGING VIEWSCONFIGURING DEFAULT VIEWS PAGES

• Configure Individual Views Pages: Ensure correct Metatags are set via Views Metatag Overview.

drupal.org/project/metatag_views_overview

• Pagination: Ensure <link rel=“previous” href=“/1”> etc. are configured to improve crawlability of View Pages

Refer to: https://www.drupal.org/node/1567684

Page 21: Drupal 7 Search Engine Optimisation

drupal.org/project/views_rss

Page 22: Drupal 7 Search Engine Optimisation

MANAGING VIEWSCONFIGURING REL ALTERNATIVE FEEDS

• Set rel alternative to a feed:

Create an RSS feed for all Views/List pages with an RSS version to improve indexability of nodes.

Page 23: Drupal 7 Search Engine Optimisation

drupal.org/project/path_breadcrumbs

Page 24: Drupal 7 Search Engine Optimisation

MANAGING BREADCRUMBSCONFIGURING RICH SNIPPET

• All Else Fails, Use JSON-LD + Contextual Views: Quick. Dirty. JSON in between a script tag.

• Do NOT Use Microdata: BreadcrumbList is buggy. Use JSON-LD or RDFa vocab instead.

Don’t forget View Pages: Breadcrumsb aren’t just for nodes.

Reference: https://www. schema.org/BreadcrumbList

Page 25: Drupal 7 Search Engine Optimisation

drupal.org/project/path_breadcrumbs

Page 26: Drupal 7 Search Engine Optimisation

QUESTIONS?

• I didn’t cover Context in this talk: Strategic Block Placement on a /path level can be used strategically to hyper optimise a page like taxonmy or views pages.

• I don’t like the SEO Checklist module: It’s opinionated and so am I.

Page 27: Drupal 7 Search Engine Optimisation