How to host Google Fonts locally with the Astra theme to comply with GDPR

astra theme templates

If you read my article about WordPress themes, Google Fonts and the GDPR you will already know that Google fonts served from their CDN do not comply with the GDPR because they collect IPs and it is not known what else Google does with user data.

Of course, a solution, no matter what theme you use, is to host the fonts locally, downloading and serving them from your server with a little bit of skill, but there are themes that make it easier, and one of them is Astra.

And you don’t have to learn any code, or even pay for the premium version of Astra, in the free version you can do it with a simple click.

Just go to the WordPress theme customizer and, in the “Performance” section of the settings check the box called “Load Google fonts locally“.

astra setting load google fonts locally

Publish the changes and only with this click 3 things will happen:

  1. A font folder is created where Astra will host the Google fonts needed for your website.
  2. The lines of code needed to load the locally hosted Google fonts are added to the stylesheet.
  3. The Astra theme stops serving Google fonts from the external CDN and uses the locally hosted copies.

And with this, with one click, you are no longer collecting IPs or anything for Google, respecting the privacy of your users and complying with the GDPR, and other privacy regulation laws.

By the way, by not serving external resources, you will improve your scores in the main web metrics.

How useful was this post?

Click on a smiley to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

About The Author

Leave a Comment

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

Scroll to Top
Skip to content