If your WordPress site shows "The page isn't redirecting properly" or "too many redirects" after you move it, the site URL settings or a redirect rule probably still point to the old address. Work through the checks below in order.
Why this happens
WordPress stores two address settings. The WordPress Address (siteurl) is where the core files live. The Site Address (home) is the address visitors use. A loop can happen when these values do not match, or when they point to a different protocol (http or https) or a different form of the domain (with or without www).
Other common causes are a leftover redirect rule, a plugin that forces HTTPS, or a proxy such as Cloudflare. The steps below cover each one.
Fix the redirect loop
Step 1: Check the WordPress address settings
- Log in to your WordPress dashboard.
- Go to Settings > General.
- Check that WordPress Address (URL) and Site Address (URL) are identical.
- Check that both use the same protocol (https or http) and the same www or non-www form.
- Save any changes.
Step 2: Check wp-config.php
The wp-config.php file is the main WordPress configuration file. Values in it override the dashboard settings. Old copies of a site often contain values from the previous host.
- Open your hosting control panel and go to File Manager, or connect by FTP.
- Open the WordPress folder (usually public_html) and open wp-config.php.
- Look for
WP_HOMEandWP_SITEURL. If they are present, set them to your new address. - Save the file.
Step 3: Check the database values
Changing the dashboard settings does not always update links stored in the database. Check the two address rows in the database directly.
- Open wp-config.php and note the values of
DB_NAMEand$table_prefix. The prefix is not alwayswp_. - Open phpMyAdmin from your hosting control panel and select your WordPress database.
- Open the options table (for example
wp_options, using your table prefix). - Find the rows named
siteurlandhome. - Edit
option_valuein both rows so they show your new address.
Search-and-replace plugins can also update old URLs in your content. These are third-party tools, so take a backup first and run any dry run before making changes.
Step 4: Reset the .htaccess file
The .htaccess file in your site's root folder can hold redirect rules from the old host or from a plugin. WordPress can create a new default file.
- Open File Manager or connect by FTP.
- Download a copy of .htaccess as a backup.
- Rename the original file, for example to
.htaccess-old. - In WordPress, go to Settings > Permalinks and select Save Changes without changing anything. WordPress creates a new .htaccess file.
Step 5: Check HTTPS and the SSL certificate
Forcing HTTPS before the SSL certificate is active causes a redirect loop. Check that SSL is active for your domain before you force HTTPS. You can find SSL settings in the SSL/TLS section of your control panel.
Use only one HTTPS redirect. If a plugin, your control panel and a CDN all redirect to HTTPS, the requests can loop.
Step 6: Turn off redirect or SSL plugins
Some plugins, such as Really Simple SSL, Redirection and 301 Redirects, can conflict with server redirects. Deactivate them one at a time to find the cause. If you cannot reach the dashboard, rename the plugin's folder in the wp-content/plugins folder using File Manager or FTP. This disables the plugin.
Step 7: Check Cloudflare or another proxy
If your domain uses Cloudflare, check the SSL/TLS encryption mode in your Cloudflare account. Flexible mode can cause a loop. Set it to Full or Full (Strict). Cloudflare is not part of the Hostking control panel, so you manage this setting in Cloudflare.
Clear your browser and cache
Your browser may still hold an old redirect or cookie. Test the site in a private window. If that works, clear the cookies for your site in your browser settings.
If your site uses a cache plugin or a server cache, clear it and test again.
Troubleshooting
If the loop continues after these steps, work through the checks one at a time and test after each change. Changes to wp-config.php, the database and .htaccess can make a site unavailable, so keep a copy of each original file.
If you are still stuck, contact support using live chat on the website or open a support ticket from the client area at my.hostking.host.
