Said It Here

How to move a website from a subdomain to the main domain

Building a new site on a subdomain often leaves behind stubborn redirect loops that persist even after updating configuration and .htaccess files. This traps your main domain pointing back to the subdomain, preventing the new site from going live correctly.

Overview
People affected2 accounts across 1 forum
Workarounds found4 items attempted
Community agreement9 total upvotes

What people tried

Every workaround mentioned in the threads below. We haven’t tested any of them — and nobody here is claiming they worked.

Found another way around this?

Share your steps and trade-offs so fellow engineers don't have to reinvent the wheel. No account required.

  1. 1
    building the new site somewhere else
    Did this help you?
  2. 2
    using a redirect checker tool
    Did this help you?
  3. 3
    checking the database for the home url
    Did this help you?
  4. 4
    defining WP_HOME and WP_SITEURL constants in the wp-config.php file
    Did this help you?
Tried another approach not listed above?+ Share your workaround ↑

In their words

Unedited, grouped by where they were said, most upvoted first within each place, each linked to the thread it came from.

r/Wordpress2 people · September 2026

“if I build a new site on the subdomain, is it easy enough to move it over when I have built it - or should I be building the new site somewhere else?”source ↗

LegalAlienInDenmark · r/Wordpress · 8 upvotes

“I am really scratching my head on this one. I clones a WP install from a subdomain to a new separate domain. Previously I had a redirect from the domain to the sub domain but after the clone and setting the config and htaccess files mydomain.com is still redirecting to sub.mydomain.com. I clear cached the and checked every existing configuration I could think of but it is still redirecting. What am I missing?”source ↗

auggie_d · r/Wordpress · 2 upvotes

Where this came up

People with this problem also raised