To change your WordPress domain without breaking your site, you must update the core URL settings in your WordPress database, implement a series of 301 redirects from the old domain to the new one, and ensure all internal links are correctly mapped. This process requires a systematic approach that includes creating a full backup, updating the site’s configuration files, and clearing various layers of cache.
Changing a domain is more than just a cosmetic update; it is a fundamental shift in your website’s identity. For small business owners and bloggers, a domain change often happens when a brand is refreshed, a name is simplified, or a company expands its reach. However, if handled incorrectly, a domain change can lead to a “404 Not Found” crisis, broken images, and a significant drop in search engine rankings.
When you change a domain, search engines like Google need to understand that the content from the old URL has moved permanently to the new one. If this connection isn’t established via proper redirects, you lose the “link equity” (SEO authority) you spent months or years building. Furthermore, WordPress stores many pieces of data—such as image paths, permalinks, and widget settings—as absolute URLs. If you only change the domain in the main settings, these hidden paths will still point to the old domain, causing the site to appear broken to your visitors.
Before you touch a single line of code or change a setting, you must prepare your environment. Following a WordPress Hosting for Small Business 2026: A Practical Checklist is a great way to ensure your infrastructure is ready for the move.
Changing the domain involves several layers of the WordPress architecture. Follow these steps in order to maintain site integrity.
The first step is the most visible. Log into your WordPress admin dashboard and navigate to Settings > General. Here, you will find two fields: “WordPress Address (URL)” and “Site Address (URL).”
Update both fields to the new domain (e.g., change https://olddomain.com to https://newdomain.com). Note that if you are changing the domain but keeping the same folder structure, these will be identical. If you are moving to a subdirectory, they will differ.
Sometimes, the WordPress dashboard will prevent you from saving the new URL if the site is already live. In these cases, you must edit the wp-config.php file via FTP or your hosting control panel. Add the following lines to the file:
define( 'WP_HOME', 'https://newdomain.com' ); define( 'WP_SITEURL', 'https://newdomain.com' );
By hardcoding these values, you override the database settings, which is useful during the transition phase.
This is the most critical technical step. WordPress stores absolute URLs in the wp_options, wp_posts, and wp_postmeta tables. A simple “Find and Replace” in a text editor will not work because WordPress uses “serialized data.” If you change the length of a string in a serialized array without updating the count, the data will break.
To do this correctly, use a plugin like “Better Search Replace” or a command-line tool like WP-CLI. You will search for olddomain.com and replace it with newdomain.com. This ensures that every image path, internal link, and metadata entry is updated globally.
Once the new site is live on the new domain, you must tell the internet that the old site has moved. A 301 redirect is a “permanent” redirect that tells browsers and search engines to pass the SEO authority to the new URL.
You can do this via your .htaccess file. A standard redirect looks like this:
Redirect 301 /old-page-path https://newdomain.com/new-page-path
If your page structure remains identical, a wildcard redirect can be used to point the entire old domain to the new one.
After the database update, go to Settings > Permalinks and simply click “Save Changes.” This flushes the rewrite rules and ensures that your URL structure is correctly registered with the new domain.
| Feature | Old Domain Configuration | New Domain Configuration |
|---|---|---|
| DNS Records | Pointing to original server IP | Pointing to new/current server IP |
| Database URLs | Contains olddomain.com |
Contains newdomain.com |
| SEO Authority | Original authority source | Inherited via 301 redirects |
| SSL Certificate | Issued for olddomain.com |
Must be re-issued for newdomain.com |
| Internal Links | Point to olddomain.com |
Point to newdomain.com |
Consider “Maple Leaf Bakery,” a local business currently operating at bakery-maple.ca. They have decided to rebrand to maplebakery.ca to better reflect their new storefront. They have a catalog of 150 products, each with its own unique URL and high-quality images.
If the owner simply changes the domain in the WordPress settings and launches the new site, the following happens:
bakery-maple.ca.By following the correct process—backing up the site, using a Search and Replace tool to update the image paths in the database, and setting up a 301 redirect for every product page—the bakery ensures that the customer experience remains seamless and their search engine rankings stay intact.
Once the domain change is complete, your work isn’t finished. You must perform several maintenance tasks to ensure the transition is fully realized:
Clear All Caches: Clear your WordPress caching plugin (e.g., WP Rocket or W3 Total Cache), your server-side cache (like Varnish or Nginx FastCGI cache), and your Content Delivery Network (CDN) cache (like Cloudflare). If you don’t clear these, users may still see the old domain or broken elements.
Update External Links: If you have listed your website on social media profiles, Google Business Profiles, or local directories, you must manually update those links to the new domain.
Monitor for 404 Errors: Use a tool like Google Search Console to monitor for “404 Not Found” errors. This will tell you if there are any pages you missed during the redirect mapping process.
Re-verify SSL: Ensure that your new domain has a valid SSL certificate installed. A domain change often requires a new certificate to be issued, as the old certificate will not cover the new domain’s identity.
For those looking for a stable environment to host these changes, choosing the right website-hosting provider is essential. A reliable host provides the tools and environment necessary to manage these complex database and DNS changes without downtime. If you are moving a large site, you might also consider How to Migrate Your Website to a New Host with Zero Downtime as a complementary guide to your domain transition.
Changing your domain will not inherently hurt your SEO, but failing to implement 301 redirects will cause you to lose your existing rankings. By properly redirecting every old URL to its new equivalent, you signal to search engines that the content has moved, allowing you to retain your authority.
While the changes in your WordPress database are instant, DNS propagation can take anywhere from a few minutes to 48 hours depending on your provider. During this window, some users may still see the old site while others see the new one.
Yes, if your email addresses are tied to your domain (e.g., info@olddomain.com), you will need to set up new email accounts for the new domain. Changing the website domain does not automatically update your email hosting or your mailbox configurations.
Sources:
If you are ready to move your site to a more robust environment, explore our website hosting options today.