drupal seo pitfalls how to avoid them

71
Drupal SEO Pitfalls and How To Avoid Them - by Brent Gees and Wouter De Bruycker

Upload: khangminh22

Post on 23-Feb-2023

1 views

Category:

Documents


0 download

TRANSCRIPT

Drupal SEO Pitfallsand

How To Avoid Them- by Brent Gees and Wouter De Bruycker

1ABOUT USPUBLIC ENTITIES 2

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 3

ABOUT US

Brent Gees

● Drupal Architect and Drupal Trainer at Dropsolid

● Speaker at Drupal Dev Days Lisbon 2018

● Speaker at Drupalcamp Ghent 2018

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 4

ABOUT US

Wouter De Bruycker

● SEO Strategist & Evangelist at Dropsolid

● Speaker at Digital Content Marketing Congress: "Technical SEO 101 (& 102)"

● Closing Keynote Speaker at DMB Day “Today is Yesterday's Future: SEO in Evolution"

2PUBLIC ENTITIESALL PAGES SHOULD BE AN ENTITY

ABOUT US

3

1

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 6

PUBLIC ENTITIES

By default, entities might be publicly available on their own unique URL.

Example: a “team member” module could generate a public node for each team member, while they are really only used for a “team overview

page” and the site doesn’t need detail pages for each team member.

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

The case

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 7

PUBLIC ENTITIES

This results in low value and “thin content” pages, indexable by Google.

You don’t want these pages on your site because they are a waste of resources (bandwidth, crawl budget, database storage, …).

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 8

PUBLIC ENTITIESPrevent those entities from being accessed by visitors

This can be done by modules such as rabbit_hole

The solution

3ALL PAGES SHOULD BE AN ENTITYINDEXED INTERNAL SEARCH

PUBLIC ENTITIES

4

2

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 10

ALL PAGES SHOULD BE AN ENTITY

Oftentimes, some pages on websites are generated based on other content. These pages are not an “editable node” in the backend.

Examples: homepage, overview pages, ...

The case

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 11

ALL PAGES SHOULD BE AN ENTITY

When a page isn’t editable as a node, there’s no easy way to edit the meta tags, or to configure the XML sitemap inclusion for this page, or ...

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 12

ALL PAGES SHOULD BE AN ENTITY• Use the core drupal layout builder to construct the homepage

The solution

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 13

ALL PAGES SHOULD BE AN ENTITY• Use paragraphs together with modules such as block_field or

overview_field to add blocks to the page.

The solution

4INDEXABLE INTERNAL SEARCHINDEXED TEST ENVIRONMENTS AND PAGES

ALL PAGES SHOULD BE AN ENTITY

5

3

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 15

INDEXABLE INTERNAL SEARCH

By default, internal search result pages are often indexable by search engines.

The case

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 16

INDEXABLE INTERNAL SEARCH

This results in low value and “thin content” pages, indexable by Google.

You don’t want low-value pages in the index.

Google also implicitly mentions in its quality guidelines to not let Googlebot index internal search results.

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 17

INDEXABLE INTERNAL SEARCHWhen using views for your search pages

install metatag and metatag_views module

The solution

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 18

INDEXABLE INTERNAL SEARCHWhen using a node for your search pages

Install metatag and add the field to your content type

The solution

5INDEXED TEST ENVIRONMENTSAND PAGES

ASSETS BLOCKED BY ROBOTS.TXT

INDEXABLE INTERNAL SEARCH

6

4

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 20

INDEXED TEST ENVIRONMENTS AND PAGES

Development and staging environments are often crawlable and indexable by search engines because of configuration issues.

Or because of laziness ¯\_(ツ)_/¯

Temp content is also something that often shows up in search results.

The case

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 21

INDEXED TEST ENVIRONMENTS AND PAGES

Everybody probably agrees we don’t want our staging environments or paragraph testing pages to be in the Google index, or even be publicly

available, for a wide range of reasons.

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 22

INDEXED TEST ENVIRONMENTS AND PAGES The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 23

INDEXED TEST ENVIRONMENTS AND PAGESTest pages on live environments

Unpublish if possible or prevent from indexing with metatag module

The solution

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 24

INDEXED TEST ENVIRONMENTS AND PAGESTest environments

Use htpassword protection for your environments

The solution

6ASSETS BLOCKED BY ROBOTS.TXTMODULE OVERLOAD

INDEXED TEST ENVIRONMENTS AND PAGES

7

5

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 26

ASSETS BLOCKED BY ROBOTS.TXT

Sometimes website assets (like favicons or images) are located inside a folder that’s blocked for crawlers via the robots.txt.

The case

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 27

ASSETS BLOCKED BY ROBOTS.TXT

We want Google to understand our entire page and “see” it as a regular

website visitor would see it.

If some assets are blocked via robots.txt, Google can’t view the

page as if it was a regular website visitor.

The problem

Image: notification in Google Search Console due to blocked site assets.

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 28

ASSETS BLOCKED BY ROBOTS.TXT

Make sure your website assets (images, icons, favicon, …) are in a publicly available folder, not blocked by robots.txt.

Keep an eye on your Google Search Console property for notifications regarding blocked resources.

The solution

7MODULE OVERLOADREDIRECT-REDIRECT-REDIRECT

ASSETS BLOCKED BY ROBOTS.TXT

8

6

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 30

MODULE OVERLOAD

There are a lot of modules available for a wide range of use cases, which is mostly a good thing.

The case

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 31

MODULE OVERLOAD

Be careful not to overload your website with bulky or unnecessary modules.

Each one could require multiple resources to be downloaded and executed by the browser, which will have an impact on your website

speed.

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 32

MODULE OVERLOAD

“We encourage you to start looking at your site's speed “...” — not only to improve your ranking in search engines, but also to improve everyone's

experience on the Internet.”

Source: Google Webmaster Central Blog - “Using site speed in web search ranking” https://webmasters.googleblog.com/2010/04/using-site-speed-in-web-search-ranking.html

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 33

MODULE OVERLOAD

Think twice before installing a module. Do you really need it or is there an easier solution?

Check if there are unused modules on your site with something like unused_modules.

The solution

8REDIRECT-REDIRECT-REDIRECTSECURITY LEAKS IMPACTING SEO

MODULE OVERLOAD

9

7

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 35

REDIRECT-REDIRECT-REDIRECT

Not paying close attention to redirect setups could result in multiple redirects following each-other.

The case

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 36

REDIRECT-REDIRECT-REDIRECT

Redirect chains are not search-engine-friendly.

When Googlebot visits a page which returns a redirect statuscode, it adds that page to the bottom of its “to visit” list for that website.

For small websites this is not a big problem, but for big websites this could result in slow indexation times.

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 37

REDIRECT-REDIRECT-REDIRECT

You want as little redirects as possible.

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 38

REDIRECT-REDIRECT-REDIRECTDon’t just uncomment the lines in htpasswd

The solution

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 39

REDIRECT-REDIRECT-REDIRECTBut think along with your site

The solution

9SECURITY LEAKS IMPACTING SEOROBOTS.TXT DISALLOW != NOINDEX

REDIRECT-REDIRECT-REDIRECT

10

8

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 41

SECURITY LEAKS IMPACTING SEO

Allowing public file-uploads could result in lower organic traffic when not setup correctly.

The case

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 42

SECURITY LEAKS IMPACTING SEO

If files can be uploaded without some form of authentication or CAPTCHA, this could result in thousands of files being uploaded by

spammers, and indexed by Google.

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 43

SECURITY LEAKS IMPACTING SEO The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 44

SECURITY LEAKS IMPACTING SEO

When Google notices spam on your website, they could punish you with

a “manual action”, potentially lowering your organic search

visibility.

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 45

SECURITY LEAKS IMPACTING SEO

“Google issues a manual action against a site when a human reviewer at Google has determined that pages on the site are not compliant with

Google's webmaster quality guidelines”

“If a site has a manual action, some or all of that site will not be shown in Google search results.”

Source: https://support.google.com/webmasters/answer/9044175?hl=en

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 46

SECURITY LEAKS IMPACTING SEOUse a module to implement reCAPTCHA, recaptcha or simple_recaptcha

The solution

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 47

SECURITY LEAKS IMPACTING SEOKnow when to use private files and place them outside of Drupal’s web

root.

The solution

10ROBOTS.TXT DISALLOW != NOINDEXGOOGLE ANALYTICS HORROR

SECURITY LEAKS IMPACTING SEO

11

9

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 49

ROBOTS.TXT DISALLOW != NOINDEX

Contrary to popular belief, blocking a page (or folder) via robots.txt or adding a noindex directive to the meta robots tag are not the same thing.

Robots.txt instructions impact crawling, not indexing.Noindex directives using a meta tag impact indexing, not crawling.

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 50

ROBOTS.TXT DISALLOW != NOINDEX

It sounds weird, but Google is able to stumble upon a link on an external website linking to a page blocked by robots.txt, and still index it.

The result will most likely be a snippet in the search results without a title or description, since Google can’t read the title or meta-description.

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 51

ROBOTS.TXT DISALLOW != NOINDEX

“Now wait a second Wouter. I understand it could happen in theory a link is indexed even though it’s blocked by robots.txt, but do things like this

really happen in practice?”

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 52

ROBOTS.TXT DISALLOW != NOINDEXWhy yes, yes they do:

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 53

ROBOTS.TXT DISALLOW != NOINDEXA weird “/home//home” page is indexed on drupal.org.

Let’s take a look at the robots.txt: https://www.drupal.org/robots.txt …

Bingo:

They noticed “strange homepage URLs” and tried removingthis page from the Google index by blocking Google fromcrawling the page.

11GOOGLE ANALYTICS HORRORRAPID-FIRE BEST PRACTICES

ROBOTS.TXT DISALLOW != NOINDEX

12

10

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 55

GOOGLE ANALYTICS HORROR

Correct data is very important when analysing SEO-efforts

Pay close attention to sudden drops and spikes in Google Analytics data.There might be a configuration issue.

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 56

GOOGLE ANALYTICS HORROR The case

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 57

GOOGLE ANALYTICS HORROR

https://www.drupal.org/project/eu_cookie_compliance updated

Each pageview started a new session as long as website visitors didn’t accept the cookies

The problem

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 58

GOOGLE ANALYTICS HORRORTwo-step fix:

The solution

1. Anonymize the visitor IP-addresses (GA or GTM setup)

2. Whitelist the Google Analytics cookies (Drupal module setup)

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 59

GOOGLE ANALYTICS HORROR The solution

Update/patch the google analytics module to comply with the eu_cookie_compliance so that the snippet isn't loaded until approval was

given.

More information: https://www.drupal.org/project/google_analytics/issues/3060312

12RAPID-FIRE BEST PRACTICES

GOOGLE ANALYTICS HORROR 11

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 61

RAPID-FIRE BEST PRACTICES

Use the Google Analytics module (google_analytics) or the Google Tag Manager module (google_tag).

Not both.

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 62

RAPID-FIRE BEST PRACTICES

Aggregate and minify css and js files where possible.

https://www.drupal.org/project/advagg

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 63

RAPID-FIRE BEST PRACTICES

Make sure each page has a correct/well-configured canonical tag.

Not enough time to go into detail because of the complexity (what about paging parameters? facet filtering parameters? combinations with hreflang? ...)

come find us after the talk or search the interwebs for resources :)

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 64

RAPID-FIRE BEST PRACTICES

Use Pathauto module to generate nice urls for your pages

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 65

RAPID-FIRE BEST PRACTICES

Follow-up on the amount of pages indexed by Google via Google Search Console.

Seems too high?

Maybe some rabbithole setup is needed to remove separate pages

from the index.

Seems too low?

Maybe important pages are no-indexed?

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 66

RAPID-FIRE BEST PRACTICES

Make sure your base url is not ‘http://default/’ in your sitemap XML, we’ve seen this issue occur a lot in live sites.

Setup your cron job correctly, more info:https://www.drupal.org/project/xmlsitemap/issues/1944518

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 67

RAPID-FIRE BEST PRACTICES

Create checklists!

• Things that have to be done before going live• Things to check when site is live

• Things to check when site is live for x days

Image: WARNER BROS. ENTERTAINMENT INC.

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019 69

QUESTIONSTime left?

Fire away!

No more time?

Come find us at the Dropsolid booth (#13)

Get in touch:https://www.linkedin.com/in/brentgees/

https://www.linkedin.com/in/wouterdebruycker/

+ Keep an eye on the Dropsolid Twitter feed for these slides!

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019

TODO

ABOUT US

70

Join us for contribution opportunitiesThursday, October 31, 2019

Mentored Contribution

9:00-18:00Room: Europe Foyer 2

First TimeContributor Workshop

9:00-14:00Room: Diamond

Lounge

GeneralContribution

9:00-18:00Room: Europe Foyer 2

#DrupalContributions

Drupal SEO Pitfalls and How To Avoid Them - DrupalCon Amsterdam 2019

TODO

ABOUT US

71

What did you think?

Locate this session at the DrupalCon Seattle website:https://drupal.kuoni-congress.info/2019/program/

Take the Survey!https://www.surveymonkey.com/r/DrupalConAmsterdam

Thank You!