• Resolved edsouza

    (@edsouza)


    I have installed the Really Simple SSL and it is working. However, it is causing multiple redirects.

    HTTP: // Redirects to HTTPS: // (with 301)

    and

    HTTPS: // redirects to HTTPS: // www. (With 301)

    There are two redirects and duplicate content.

    Please, how do I solve this?

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    Did you try if it helps when you remove the .htaccess redirect?
    If you are using Varnish cache, please deactivate it. It often causes issues on SSL.

    Without seeing your site, I can’t really tell what’s going on, but I’ve listed the most common issues here:
    https://really-simple-ssl.com/knowledge-base/my-website-is-in-a-redirect-loop/

    Thread Starter edsouza

    (@edsouza)

    Hello, Rogier.

    I tried everything on the indicated page, but nothing worked. I also uninstalled all plugins, but it did not work.

    My website: https://goo.gl/P471vN

    My .htaccess:

    <FilesMatch “(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css|woff)$”>
    ExpiresActive On
    ExpiresDefault A2592000
    </FilesMatch>
    <IfModule mod_headers.c>
    <FilesMatch “.(js|css|xml|gz|html)$”>
    Header append Vary: Accept-Encoding
    </FilesMatch>
    </IfModule>
    FileEtag None
    <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault “access plus 1 month”
    ExpiresByType image/gif “access plus 1 month”
    ExpiresByType image/png “access plus 1 month”
    ExpiresByType image/jpg “access plus 1 month”
    ExpiresByType image/jpeg “access plus 1 month”
    ExpiresByType text/html “access plus 3 days”
    ExpiresByType text/xml “access plus 1 seconds”
    ExpiresByType text/plain “access plus 1 seconds”
    ExpiresByType application/xml “access plus 1 seconds”
    ExpiresByType application/rss+xml “access plus 1 seconds”
    ExpiresByType application/json “access plus 1 seconds”
    ExpiresByType text/css “access plus 1 week”
    ExpiresByType text/javascript “access plus 1 week”
    ExpiresByType application/javascript “access plus 1 week”
    ExpiresByType application/x-javascript “access plus 1 week”
    ExpiresByType image/x-ico “access plus 1 year”
    ExpiresByType image/x-icon “access plus 1 year”
    ExpiresByType application/pdf “access plus 1 month”
    <IfModule mod_headers.c>
    Header set Connection keep-alive
    Header unset Pragma
    Header unset Last-Modified
    Header append Cache-Control “public, no-transform, must-revalidate”
    </IfModule>
    </IfModule>
    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon image/webp application/json application/vnd.ms-access application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
    <IfModule mod_mime.c>
    # DEFLATE by extension
    AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
    </IfModule>
    <FilesMatch “\.(html|htm|rtf|rtx|svg|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|TXT|XSD|XSL|XML)$”>
    <IfModule mod_headers.c>
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    </FilesMatch>
    <FilesMatch “\.(bmp|class|doc|docx|eot|exe|ico|webp|json|mdb|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|WEBP|JSON|MDB|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$”>
    <IfModule mod_headers.c>
    Header unset Last-Modified
    </IfModule>
    </FilesMatch>
    # END W3TC Browser Cache
    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* – [E=W3TC_ENC:_gzip]
    RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
    RewriteRule .* – [E=W3TC_PREVIEW:_preview]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =””
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond “%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” -f
    RewriteRule .* “/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” [L]
    </IfModule>
    # END W3TC Page Cache core
    # BEGIN rlrssslReallySimpleSSL rsssl_version[2.5.0]
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    </IfModule>
    # END rlrssslReallySimpleSSL
    # 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

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    Can’t see any issues. Your site loads fine on Chrome, Firefox and Safari. Maybe you need to clear your cache?

    Thread Starter edsouza

    (@edsouza)

    Yes, I’ve cleared the cache.

    Taking the test at https://www.redirect-checker.org/, I get the result:

    Result:

    CONGRATULATION. Everything seems to be fine.

    =============
    https://mysite.com
    301 Moved Permanently
    https://mysite.com/
    301 Moved Permanently
    https://www.mysite.com/
    200 OK
    =============

    He is redirecting twice.

    Ideally, would not it only redirect once? As below:

    ==================
    https://mysite.com
    301 Moved Permanently
    https://www.mysite.com/
    200 OK
    ==================

    After installation, the number of pages in my site indexed by Google doubled.

    What else can I try?

    • This reply was modified 8 years, 1 month ago by edsouza.
    • This reply was modified 8 years, 1 month ago by edsouza.
    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    I thought you meant you had a redirect loop. Misunderstood. Sorry about that.

    Really Simple SSL only redirects the request url to it’s https counterpart. Reading some interviews with Matt Cutts Up it seems Google does not have a problem with up to 3 301 redirects.

    That said, you could add a redirect from https://mysite.com to https://www.mysite.com to bypass an unnecessary redirect. You can find code here:

    https://really-simple-ssl.com/knowledge-base/redirect-non-www-to-www-domains-in-htaccess/

    Thread Starter edsouza

    (@edsouza)

    Perfect, Rogier. Now all URLs are redirecting to https://www.mysite.com, and there is no double redirection.

    Thank you very much for the help and congratulations for the plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Multiple redirects detected.’ is closed to new replies.