1

I've created the CNAME subdomain: tumblr.wp20201111.blog which maps to doigy.tumblr.com.

However, when I load tumblr.wp20201111.blog in the address bar, it doesn't redirect to doigy.tumblr.com, it goes to https://www.tumblr.com/explore/trending

doigy.tumblr.com is a live URL.

Why doesn't tumblr.wp20201111.blog redirect to doigy.tumblr.com ?

1
  • 1
    I found the answer in my Tumblr blog's settings. There was an option to use a custom domain, which I set as tumblr.wp20201111.blog and set a CNAME tumblr.wp20201111.blog pointing to domains.tumblr.com.
    – Steve
    Nov 11, 2020 at 11:50

2 Answers 2

3

No, a CNAME does not cause a redirect. A CNAME is a DNS alias that says "The server for this host name is located at the same IP address as the server for this other host name." It is up to the web server at that IP address how to handle requests for the hostname. The web server may:

  • Issue a redirect.
  • Serve the same content as the other domain.
  • Serve completely different content.

Your .blog URL is not redirecting because the Tumblr webserver is not configured to make it redirect. You could point your domain to the Tumblr webserver by either A records or CNAME records and it wouldn't make a difference as to whether or not a redirect happens. The redirect HAS to be configured on the server.

I'm not sure if Tumblr offers domain alises that redirect. If they do, there should be a way to configure that in your account. If not, you could use a third party redirection service. Most DNS registrars offer redirection services or you could use Cloudflare to implement the redirect.

2

CNAMEs work entirely differently to his many people think they do, but the problem here also likely involves the web server.

CNAMEs map a (sub)domain to another domain. Because we are talking about web service ultimately this means converting a name to an IP address. What is happening in practice is your computers DNS subsystem looks up tumblr.wp20201111.blog and is referred to doigy.tumblr.com which then provides an A record with an IP address to the OS/browser.

The webserver then connects to the IP address resolved above and says - as part of the http(s) request - I want resources associated with tumblr.wp20201111.blog - (not doigy.tumblr.com). As the webserver likely does not know tumble.wp... it falls back to the defaults in the webserver and gives the final URL. Importantly, the server has no knowledge you want doigy.tumblr.com.

Unfortunately there is no method to do what you want (in the http/https protocol) at the DNS level. The closest you could come would be to configure your own web server to do the desired redirect or act as a reverse proxy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.