
If your WordPress website is still redirecting to the Hostinger temporary domain even after connecting your main domain, follow these steps:
Step 1: Update Site URL in Database
Open phpMyAdmin → Go to wp_options table
Change:
siteurl→https://yourdomain.comhome→https://yourdomain.com
Make sure both use HTTPS, not HTTP.
Step 2: Force Correct Domain in wp-config.php
Open wp-config.php and add these lines above:
/* That's all, stop editing! Happy publishing. */
Add:
define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');
Example:
define('WP_HOME','https://24siteshop.com');
define('WP_SITEURL','https://24siteshop.com');
This forces WordPress to use your main domain instead of the old temporary URL.
Step 3: Clear Cache
After saving:
- Clear Hostinger cache
- Clear WordPress cache plugins (LiteSpeed, WP Rocket, etc.)
- Open website in Incognito mode
Step 4: Check SSL
Ensure SSL certificate is active and HTTPS is working properly.
Why This Happens?
When migrating from a Hostinger temporary domain to a live domain, WordPress sometimes keeps old URLs in settings or cache, causing redirects to the temporary domain.
This quick fix usually solves the issue in minutes.