this post was submitted on 18 May 2025
10 points (91.7% liked)

Web Development

3938 readers
6 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] refalo@programming.dev 5 points 5 days ago (2 children)

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.ca 2 points 5 days ago (1 children)

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

[–] refalo@programming.dev 2 points 4 days 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.