PAID TRAINING ADS
Next SEO training - Batch 35 – 4 Week Online SEO Bootcamp with GEO concepts – Ecommerce Shopify Platform Focus - All info here.
If you are looking for more VA courses, please visit SOVA.ph
PAID TRAINING ADS
===================================
To perform a 301 redirect from HTTP to HTTPS, you’ll need to configure your web server correctly. Below are the steps for common web servers:
1. Apache
Modify your .htaccess
file or the server configuration file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
- Ensure that the
mod_rewrite
module is enabled. - Place this code in your
.htaccess
file or within the<VirtualHost>
block of your Apache configuration.
2. Nginx
Modify your server block configuration file:
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
return 301 https://$host$request_uri;
}
- Replace
yourdomain.com
andwww.yourdomain.com
with your domain name. - Restart Nginx with:
sudo systemctl restart nginx
3. IIS (Windows Server)
Use the IIS Manager to set up a redirect:
- Open IIS Manager.
- Select your site.
- Double-click HTTP Redirect.
- Check Redirect requests to this destination and enter your HTTPS URL.
- Check Redirect all requests to exact destination (rather than relative to destination).
- Set the redirection type to Permanent (301).
4. .htaccess Alternative (if not using mod_rewrite)
You can also use mod_alias
:
Redirect 301 / https://yourdomain.com/
Testing
- Test the redirect using your browser.
- You can also use online tools like Redirect Checker to verify that a 301 Moved Permanently status is returned.
If you’re hosting your website on Hostinger, you can set up a 301 redirect from HTTP to HTTPS by editing the .htaccess
file or using the Hostinger control panel.
5. Hostinger
Method 1: Edit .htaccess
File
- Log in to your Hostinger account.
- Navigate to File Manager (under Hosting → Manage → Files).
- Open the public_html directory and locate the
.htaccess
file.- If it doesn’t exist, create a new
.htaccess
file.
- If it doesn’t exist, create a new
- Add the following code to redirect HTTP to HTTPS:
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
- Save the changes.
Method 2: Use Hostinger Control Panel
- Log in to your Hostinger account.
- Go to Hosting → Manage for your website.
- Under the Advanced section, click on SSL/TLS.
- Ensure that an SSL certificate is installed and active.
- Enable the Force HTTPS option to automatically redirect HTTP to HTTPS.
Testing
- After making these changes, visit your website with
http://
and verify it redirects tohttps://
. - Use tools like Redirect Checker to confirm the status code is 301.

Coach Leandro is an award-winning SEO specialist in the Philippines with over 15 years of professional experience as an SEO consultant. He has successfully managed clients from the US, Australia, UK, and Canada, delivering data-driven strategies that generate measurable results in search engine visibility and business growth.
In 2024, he was recognized as the “Outstanding Digital Freelancer of the Year” by the City Government of Iligan for his significant contributions to the freelancing and digital marketing industry.
He is the Founder and Owner of SOVA.ph, PinoySEO.ph, and MalachiSoft.com, where he continues to lead projects, mentor aspiring professionals, and provide SEO training programs tailored to the global market.
As a trusted SEO consultant and business owner in the Philippines, Coach Leandro is dedicated to helping businesses and individuals achieve long-term online success.
Beyond his professional achievements, Coach Leandro is also a passionate drone pilot, enjoying aerial photography and creative storytelling through drone videography.