.htaccess Rule to use Bunny Fonts instead of Google Fonts

Bunny.net (aff link) recently released their own 100% free privacy-protecting drop-in replacement for Google Fonts, which is served by their CDN.

All you have to do is replace the Google Fonts domain with fonts.bunny.net – however, sometimes that can be difficult if you’re using various WordPress themes or similar that import the fonts in all sorts of weird places.

So, here’s an easier way to do it – with a .htaccess Substitute rule.

Simply add these 3 lines to your .htaccess file, and your server will do the rewrite for you.

If you have multiple sites on the one server, you could put that in the /home/.htaccess file which will apply it to all sites hosted on your server.

Leave a Reply

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