Nginx 410 maps, matching and external files

In order to bulk retire multiple URLs of your web site at once, you can use nginx maps to have the webserver reply with a 410 http code, which means: GONE and not coming back.

This can be common when migrating away from a specific CMS like WordPress that builds a bunch of taxonomy pages that you will no longer be supporting or similar.

Also, this method will work for a any sort of matching you can do, but we’ll focus on 410 and a custom error page, since this is what I had to implement recently.

Lastly we will also make nginx load a custom 410 error page, instead of the boring default.

The full code can be found in the repository:

Continue reading “Nginx 410 maps, matching and external files”

Google Webmaster Tools: Add HTTPS as separate property

Google Webmaster Tools tracks http and https on separate properties. God knows why. I had a small heart attack when I visited the dashboard and saw that my domain seemed to have vanished from search result pages and that the only thing people found my site on was a post about mining bitcoin.

It’s been a while since I switched a couple of domains to https through the awesome people at Let’s Encrypt, but I absolutely forgot that the Google Webmaster tools would not pick up search engine traffic to my pages after making use of the new URLs.

I just added to the tracking and voilà:

Everything seems alright again 😉 I’m off to doing that to a bunch of other domains now.

How to get a high score on Pagespeed Insights (and make your site fast)

This post is about how to optimize your page for speed and we’re going to test the results with the Pagespeed Insights tool provided by Google.

Google started weighting results on their search engine result pages after the results for your website, so if you score high numbers, you are more likely to show up, especially for mobile users.

Continue reading “How to get a high score on Pagespeed Insights (and make your site fast)”

Search Engine Optimization for Images

Search Engine Optimization or SEO is a phrase that is far overused in my line of work. However there are some simple conventions you can follow to improve who finds your images on which keywords. I will in this post compile a simple list of things about what I’ve learned on optimizing your images, not only for search engines, but so the humans who use them find content that is valuable to them. So let’s see how we can get some search engine optimization on our images. Continue reading “Search Engine Optimization for Images”