The [R]
flag on its own is a 302
redirection (Moved Temporarily
). If you really want people using the HTTPS version of your site (hint: you do), then you should be using [R=301]
for a permanent redirect:
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
A 301
keeps all your google-fu and hard-earned pageranks intact. Make sure mod_rewrite
is enabled:
a2enmod rewrite
To answer your exact question:
Is it bad to redirect http to https?
Hell no. It’s very good.
Related Posts:
- Why is WordPress redirecting from http to https on a local environment?
- Upgrade to SSL Breaks Admin Dashboard
- Divert http to https with WordPress on IIS
- 403 error on admin login page
- Allow non-SSL pages to use https or Force non-SSL pages to http?
- All content is HTTPS, but browsers warn of HTTP mixed content [closed]
- My site doesn’t redirect from HTTP to HTTPS
- https to https problem – 404 and can’t login
- Website Migration (with https) to a new domain(http)
- Why does WordPress uses HTTPS for JS, CSS on EC2
- Specific Page/Post Need to Stay Non SSL
- Implications of not completing all tasks when switching to HTTPS
- Moving site from HTTP to HTTPS
- How to switch static files back to using HTTP instead of HTTPS?
- Any idea on how to fix this error when forcing SSL on a certain page?
- The plain HTTP request was sent to HTTPS port in wordpress [closed]
- Is it possible to generate RSA key without pass phrase?
- Multiple SSL domains on the same IP address and same port?
- Changing my URL in General Settings cause the site to crash
- How to force HTTP and stop SSL completey on WordPress website
- What is the difference between POST and PUT in HTTP?
- What is the difference between POST and PUT in HTTP?
- nodejs – error self signed certificate in certificate chain
- Simple Java HTTPS server
- Java: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
- Getting “Handshake failed…unexpected packet format” when using WebClient.UploadFile() with “https” when the server has a valid SSL certificate
- ndroid 8: Cleartext HTTP traffic not permitted
- Https to http redirect using htaccess
- How to force Laravel Project to use HTTPS for all routes?
- How can I fix the “No certificates found – The app Chrome has requested a certificate” Android / Google Chrome issue
- Issues with installing python libraries on Windows : CondaHTTPError: HTTP 000 CONNECTION FAILED for url
- HTTP status code 0 – Error Domain=NSURLErrorDomain?
- Disable SSL / HTTPS for wordpress
- After updating site to use SSL all images in posts point to http://
- force http canonical tag on https pages
- Adding https to wordpress website
- Is the WordPress HTTPS Plugin Still Safe To Use? [closed]
- Force home page to be https?
- Redirect www to non-www htaccess
- Admin-Ajax.php, SSL, Non-SSL
- How are both HTTP and HTTPS versions displaying?
- SSL setup: wp-login css doesn’t load over httpS
- How to modify the .htaccess to force ssl on login and admin pages
- Cant Access Website – Changed HTTP to HTTPs
- In WP versions >= 4.0, is FORCE_SSL_LOGIN forcing HTTPS for the entire admin session?
- Gravity Forms not loading under https, jQuery is not defined
- SSL Partially breaking admin panel and elementor
- Occasional HTTPS Mixed Content Warning
- WordPress Redirecting HTTPS Requests to HTTP
- WordPress generated links – menus and home_url() – not using https despite settings
- How can I make uploaded images in the editor load with HTTPS?
- un-loading https
- No ‘Access-Control-Allow-Origin’ header is present [closed]
- WordPress site shows “File not found.” if opened through https
- Redirect HTTP to HTTPS for all sub domains (blog posts)
- Address a single page to SSL https secure protocol?
- wordpress http to https windows server
- How to use https on one page only?
- Locked out of admin and some pictures don’t show after failed SSL installation
- Need ideas for HTTPS multiple domain solution
- WP-admin redirects to login after adding SSL certificate
- How to make my site use HTTPS for images or how to insert images as relative paths?
- Generate HTTPS Urls in multisite
- Need workaround for insecure XMLHttpRequest endpoint request
- URLs not being output with https
- HTTPS to HTTP rewrite rules not working as expected
- How to enable http (not just https) in wordpress?
- https and wordpress breaks posts
- How can I rewrite old attachment URLs?
- Plesk login inaccessible after changing site URL
- mixed contents admin panel is Unsecured
- Moving wordpress site from HTTP to HTTPS ERR_TOO_MANY_REDIRECTS
- How to convert multisite subdomain from http to https
- WordPress Multisite keeps redirecting to HTTPS
- I get “too many redirects” problem when migrating localhost site
- Cannot access wp-admin after installing SSL – user capabilities not being set
- How to force the admin-ajax.php file to load over HTTPS?
- SSL Certificate
- How to send user data from one website to another
- How to detect if an other front-end post/page is in HTTPS/SSL from admin to display a notice?
- Mixed content and expired session issues with SSL and wp-admin
- CSS/JS is not working in multi lang installation
- Not logged in when using http
- Nice font not working when http to https – SSL Issue
- Cant enter admin page with SSL
- What are some best practices to clean up http mix content warnings?
- iHow to redirect all http traffic to https now that a SSL certificate is added?
- How do I select which Apache MPM to use?
- How to list Apache enabled modules?
- How do I prevent apache from serving the .git directory?
- Proxy Error 502 “Reason: Error reading from remote server” with Apache 2.2.3 (Debian) mod_proxy and Jetty 6.1.18
- How do high traffic sites service more than 65535 TCP connections?
- Dealing with HTTP w00tw00t attacks
- Using variables in Apache config files to reduce duplication?
- Best way to redirect all HTTP to HTTPS in IIS
- Remove “www” and redirect to “https” with nginx
- Do you have any useful awk and grep scripts for parsing apache logs? [closed]
- Development to production, how to move a development site from http + dev.example.com to a production site https + example.com?
- How do I make the block editor use https by default?
- Https Website: CSS and JS files load in http and admin page does not load too