• I just switched our site over to https tonight and everything seems to be working fine, but I have a question and not sure about the answer.

    It was just a little more than a month ago, I totally re-did the website and because of this created many 301 redirects in the htacess file to the new page URLs.

    Now, we just went to https and to take care of that part, I put this in the htaccess:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    The question is, on all the other redirects (from over a month ago) which are for individual pages, those are pointing to the new URLs, but in the http version.

    Do I just leave things as is? It would seem to me that it would be confusing to a search engine to see that it should redirect to https, then below that a slew of pages redirecting to non https version of the pages.

    Do I just change all the individual pages that were from over a month ago to https or do I need to do individual redirects for each page I initially redirected to a http page?

    I sure hope this doesn’t sound confusing.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Could you share your .htaccess file?

    Thread Starter ewhitaker

    (@ewhitaker)

    Below is the contents of the file. I did not copy all of the individual 301 redirects and left one as a sample. Because the site is still new, there are still pages showing up in the Search Console that need to be redirected to the new pages. I have tried entering the redirects and pointing to the https version, but all this does is cause a loop and the browser throws back an error on too many redirects. So, I then tried redirecting the pages to the http version, but I still get the redirect error in the browsers. It seems I can’t do anymore redirecting at all for any of the pages showing up in the search console. Not sure how to let google know that the pages have moved to a new URL anymore.

    **I do have 4 versions of this site set up in the console and set the preferred domain. I am also using Jetpack and Cloudflare.

    Header set Strict-Transport-Security “max-age=31536000” env=HTTPS

    #Redirect all traffic to https
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    #End redirect all traffic to https

    # BEGIN YOAST REDIRECTS
    <IfModule mod_rewrite.c>
    RewriteEngine On
    Redirect 301 “/shop/cuckoo-clocks/souvenir-cuckoo-clock-battery-operated” “/shop/cuckoo-clocks/souvenir-cuckoo-clock-wind-up”
    </IfModule>
    # END YOAST REDIRECTS

    # Yoast SEO – XML Sitemap Rewrite Fix
    RewriteEngine On
    RewriteBase /
    RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
    RewriteRule ^locations.kml$ /index.php?sitemap=wpseo_local_kml [L]
    RewriteRule ^geo_sitemap.xml$ /index.php?sitemap=geo [L]
    RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
    RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L]
    # END Yoast SEO – XML Sitemap Rewrite Fix

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    ## EXPIRES HEADER CACHING ##
    ExpiresActive On
    ExpiresByType image/jpg “access 1 year”
    ExpiresByType image/jpeg “access 1 year”
    ExpiresByType image/gif “access 1 year”
    ExpiresByType image/png “access 1 year”
    ExpiresByType text/css “access 1 month”
    ExpiresByType application/pdf “access 1 month”
    ExpiresByType application/javascript “access 1 month”
    ExpiresByType application/x-javascript “access 1 month”
    ExpiresByType application/x-shockwave-flash “access 1 month”
    ExpiresByType image/x-icon “access 1 year”
    ExpiresDefault “access 2 days”
    ## EXPIRES HEADER CACHING ##

    Options +FollowSymLinks

    # redirect from old site as of 2-4-18
    redirect 301 /html/newsletters.html https://www.deutscheshaus.cc/articles/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘http to https’ is closed to new replies.