Pointing CNAME to subdomain with a WordPress installation – Will that create any issues inside WordPress?

[ad_1]

Sorry if this is a stupid question, I have limited knowledge about DNS and never had this case:

I’m currently building a WordPress website for a customer managing their own DNS. They set up a subdomain ([sub.domain.com](https://sub.domain.com)) for me to develop the website. Once everybody is happy, they said they’ll simply point the CNAME of the main domain ([domain.com](https://domain.com)) to this subdomain.

Will this work out of the box or should I expect some issues? Do I keep [sub.domain.com]) inside the WordPress settings for the site URL? Do I have to run a search & replace inside the database to change everything from [sub.domain.com]) to [domain.com](https://domain.com)?

I just want to make sure the transition is smooth, and I’ll know what to do if any issues regarding the domain name arise.

Thanks in advance for every answer!

[ad_2]
1 Comment
  1. That’s a common method to build a new site.

    *Do I have to run a search & replace inside the database to change everything from sub.domain.com to domain.com?*

    Yes, but don’t do that in the database directly, as you’ll corrupt serialised strings. Use the Better Search Replace plugin

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer