Sometimes, your WordPress site might unexpectedly redirect to either HTTPS or HTTP, even though you haven’t configured it that way. This can be a huge inconvenience and can affect your site’s SEO and user experience. In this article, we’ll explore common causes of this issue and show you how to fix WordPress Site Redirecting to HTTPS or HTTP effectively.


Common Causes of WordPress URL Redirect Issues

  1. Incorrect Site URL Settings WordPress stores the site’s URL in the database. If these settings are incorrect, it may redirect visitors to HTTP or HTTPS.
  2. SSL Certificate Issues If you recently installed an SSL certificate but didn’t configure it correctly, your site might not redirect securely to HTTPS.
  3. Plugin Conflicts Some plugins, especially caching and security plugins, can force redirects, leading to unwanted HTTP or HTTPS redirection.

How to Fix WordPress URL Redirection Issues

  1. Update Site URLs in the Database Log into your WordPress database via phpMyAdmin and check the wp_options table. Look for siteurl and home values. Ensure both are correct and match your preferred protocol (HTTP or HTTPS).
  2. Force HTTPS in wp-config.php To force HTTPS across your site, add these lines to your wp-config.php file:
    define('WP_HOME', 'https://yourdomain.com');
    define('WP_SITEURL', 'https://yourdomain.com');
  3. Clear Browser and Server Cache Cached data can sometimes cause redirection issues. Clear your browser cache and any server-side cache through your hosting control panel to ensure the settings are properly updated.
  4. Disable Forced Redirection by Plugins Some plugins automatically force HTTPS or HTTP redirection. Deactivate or configure these plugins properly to prevent unnecessary redirects.
ALSO READ  How to Change WordPress login URL for Security

Conclusion

Fixing redirect issues in WordPress can be a simple task if you ensure your site’s URL settings are correct and SSL certificates are configured properly. If redirection issues persist, consider using a managed hosting provider like Kinsta or Pressable for additional support.


Affiliate Disclaimer:
Some links on this page are affiliate links, meaning I may earn a commission if you make a purchase at no extra cost to you. Thank you for your support!

No Comments
Comments to: How to Fix WordPress Site Redirecting to HTTPS or HTTP

Your email address will not be published. Required fields are marked *

Attach images - Only PNG, JPG, JPEG and GIF are supported.