Graham Stevens
⟵ Home

Tumblr as a Subdirectory (On Nginx)

Tumblr will let you run a blog as a sub-domain ( rather than using their own URL scheme (, allowing your blog to appear much more professional and appear directly linked to your domain/website.

However, it is argued within the SEO scene that a subdomain is bad practice for maximising your search engine optimisation. This is because subdomains do not always receive the benefits from the root domain they’re on. For example, just because is a highly ranked domain, does not mean that this ranking will affect or john

Subdirectories, on the other hand, get all the benefits from its associated domain, as it is considered a continuation of the original root website e.g. &

Further details can be found on this great post at The Moz.

So after all of this, you want to run your tumblr on your domain as a subdirectory:

server {
        listen          80;

        access_log      /var/log/nginx/access.log;

        proxy_set_header  X-Real-IP       $remote_addr;
        proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header  Host            $http_host;
        proxy_set_header  REMOTE-HOST     $remote_addr;
        proxy_redirect    off;
        proxy_max_temp_file_size          0;
        location /blog/ {
server {
        listen          80;
        rewrite ^/(.*)$1 permanent;

What this configuration allows is any access to is passed through a proxy to your Tumblr blog, including the URL scheme. It will also redirect any access to to

Hope this helps!

$ whoami I am Graham Stevens, a Cyber Security Specialist based in the South West of the UK. If you're lucky, I very occasionally post updates on Twitter/Mastodon.