Pointing a subdomain to my wordpress site

My site is hungry-murdock-296e9b.netlify.com but I also have a custom domain linked to that.

I want to point a subdomain like shop.mydomain.net to mywordpress.com that is hosted in another server.

I tried with CNAME and/or with A record, but because that site is in a shared hosting server, it points to the default site for that IP.

Is there any way around this without a dedicated IP for my external site?

@raduanastase Welcome to the Netlify community. You should be able to do this with a CNAME entry. What have you tried that didn’t work?

Here is the config I did with CNAME that doesn’t work

Name: shop.funbible.net
TTL: 3600 seconds
Value: funbible-store.raduanastase.com

Hi, @raduanastase. The CNAME is working. The lookup returns the record you created:

$ dig shop.funbible.net  +noall +answer

; <<>> DiG 9.10.6 <<>> shop.funbible.net +noall +answer
;; global options: +cmd
shop.funbible.net.	3599	IN	CNAME	funbible-store.raduanastase.com.
funbible-store.raduanastase.com. 14399 IN A

The issue is that the server at that IP address doesn’t know to see the site funbible-store.raduanastase.com when referenced by the domain name shop.funbible.net.

The solution will be a setting change with that system or hosting service to add that custom domain to the site in question. You will likely need to consult the documentation or support team for that other service to find out how to make the change there.

To summarize, the DNS record works. The web server that the DNS record points to is missing some configuration which will allow the correct site to be shown for that domain name.

If there are other questions about this, please let us know.

Thanks for the reply, but as I said in the initial post, my site is on a shared hosting and that IP will go to the default site associated with that IP.

So the question was if there is anyway to do this without moving my site to a dedicated IP?

Hi, @raduanastase. I’m 99% sure you will be able to do this (without a dedicated IP address) at your shared hosting service.

How? That I don’t know. That is a question for the shared hosting service not for Netlify. I know for a fact that this it possible in most cases but I don’t know the specifics for that other service.

Our CDN at Netlify does this. Nginx and Apache can do this. If you were using one of any of those, I would be able to explain how. For example, with Netlify you add the new custom domain under Site Name > Settings > Domain management > Custom domains. If the DNS works and the custom domain is added to the site, we show the correct site for that custom domain.

There will be (or at least I fairly sure there will be) a similar setting at your shared hosting. Where is that setting? I don’t know. Someone at the shared hosting company should be able to tell you though.

You were right, I didn’t need a dedicated IP. I added the domain in the cpanel of my hosting provider, then I added a subdomain and with the CNAME configuration in Netlify, it worked.

Thanks for all your support!

1 Like