Same as above:

Can I create a CNAME record to point a subdomain to a webpage e.g. blog.example.com -> example.com/blog?

I would also like to know if I can do this to point subdomains to webpages on different websites.

e.g. bluesky.example.com -> bsky.app/profile/example.com

  • refalo
    link
    fedilink
    arrow-up
    5
    ·
    1 day ago

    Not strictly within the normal way DNS works, no. A CNAME record response can only contain another domain or subdomain name. You would have to run a webserver that listens on the IP that the CNAME record eventually pointed to, in order to handle redirections to a specific URL.

    • twopi@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      OK. Is there a web service that does this or do I have to run my own service and make the redirects myself?

      • refalo
        link
        fedilink
        arrow-up
        2
        ·
        8 hours ago

        There is, just google something like “url redirection service” and you’ll find lots. Your domain/DNS provider may already offer one as well.