Hosting subdomain on netlify

Hello Nelify Community,

I am trying to figure out how to I host my subdomain on Netlify.com.

for eg. I need to keep subdomain.mydomain.com url (can not use subdomain.mydomain.netlify.com)

Neltify only offers direction on changing DNS settings which works if you want to host your primary domain on netlify however since changing the DNS configs for a subdomain is not possible how would I go about it.

Thank you very much
Best regards
Maurice Oppenberger

Welcome to the Community Maurice!

For all kinds of subdomains it should be possible to use a CNAME record.
Our docs have more instructions on this: https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/#configure-a-subdomain

Hi Marcus,

Thank you for the quick response. Would you suggest only editing the CNAME? I solved my issue by editing the A record of my subdomain. However now I am faced with the issue that I lost access to my wordpress panel which was location at subdomain.mydomain.com/wp-admin.
And reading about it suggests to keep the wp installation on a separate subdomain.
Is that really the best/only option to solve that issue?

thank you for your support
Maurice

Can you describe more about what you are trying to achieve?
Netlify will not be able to host your Wordpress installation, but you seem to be aware of that.

Do you want to move to a Netlify site which is backed by data from a wordpress installation (like it is possible with Gatsby)?
If so, I’d advise you to put a DNS record in place at something like wordpress.mydomain.com pointing to your Wordpress hosting. This will be the place for editors to access the CMS UI and for the site generator to get its data from.

If there are dynamic parts of your wordpress installation that you’d still like to host along your static site you can use redirect/proxy rules: https://docs.netlify.com/routing/redirects/rewrites-proxies/#proxy-to-another-service
(Though I think you should be fine without those)

Yes, that is exactly what i am trying to archive.
my site is a gatsby/wordpress build. I added an additional DNS A record at
wp-mysubdomain.mydomain.com to netlify and waiting for the propagation.

thanks for your suggestion
Maurice

Glad I was able to help.

I can also suggest to set the TTL of your records to 60 before you are applying changes so changes apply fast. (And set them back to their default once you verified.)

awesome, thanks for the tip