So once we got into the HSTS preload list, nobody could to go http://feeds.howtogeek.com anymore, and Feedburner’s custom DNS option didn’t support HTTPS. So it was time to switch to our own thing.

The quick and easily solution was to serve up all requests to a static copy of our RSS feed that we had stored in the index.html file. To force nginx to serve that file whether somebody went to /howtogeek/ or /howtogeek/1 or even /howtogeek1 was as simple as using the try_files directive.

You’ll just want to edit your server or location block with try_files like this:

Replace the /index.html part with whatever your static HTML page is. Once you’re done you’ll have a block kinda like this, which will send every request to the file index.html which should be found in the root directory, in this case /data/webroots/feeds/.

Restart nginx with a

command, and you’re all set.