D
D
Dmitry Klimantovich2018-10-02 17:12:41
Search Engine Optimization
Dmitry Klimantovich, 2018-10-02 17:12:41

Is the redirect set to HTTPS correctly?

I installed free certificates and set up a redirect. This is what my .htaccess file looks like after setup

AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
#Включаем отслеживание сим-ссылок
Options +FollowSymLinks
#Запускаем url_rewriting
RewriteEngine On
RewriteBase /
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index(\.(php|html|htm))?\ HTTP/ 
RewriteRule ^(.*)index\.(php|html|htm)$ $1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{THE_REQUEST} \.(php|html|htm)\ HTTP/
RewriteCond %{THE_REQUEST} !form\.(php|html|htm)\ HTTP/
RewriteRule ^(.*)\.(php|html|htm)$ $1 [R=301,L]
RewriteCond %{QUERY_STRING} ^(.+)$ [NC]
RewriteRule ^(.*)$ $1? [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php

# сжатие text, html, javascript, css, xml:
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>

# кеш браузера
<IfModule mod_expires.c>
ExpiresActive On
#по умолчанию кеш в 5 секунд
ExpiresDefault "access 7 days"
# Включаем кэширование изображений и флэш на месяц
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType image/jpeg "access plus 4 weeks"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/gif "access plus 43829 minutes"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
# Включаем кэширование css, javascript и текстовых файлоф на одну неделю
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 604800 seconds"
ExpiresByType application/javascript "access plus 604800 seconds"
ExpiresByType application/x-javascript "access plus 604800 seconds"
# Включаем кэширование html и htm файлов на один день
ExpiresByType text/html "access plus 43200 seconds"
# Включаем кэширование xml файлов на десять минут
ExpiresByType application/xhtml+xml "access plus 600 seconds"
# Нестандартные шрифты сайта 
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
</ifModule>

# Cache-Control
<ifModule mod_headers.c>
# 30 дней
<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
# 30 дней
<filesMatch "\.(css|js)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
# 2 дня
<filesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=172800, public, must-revalidate"
</filesMatch>
# 1 день
<filesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=172800, private, must-revalidate"
</filesMatch>
</ifModule>

#Запрет отдачи HTTP-заголовков Vary браузерам семейства MSIE
<IfModule mod_setenvif.c>
BrowserMatch "MSIE" force-no-vary
BrowserMatch "Mozilla/4.[0-9]{2}" force-no-vary
</IfModule>

<IfModule mod_deflate.c>
#Включаем сжатие
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/css
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
</IfModule>

The redirect itself works without problems, and online checks do not reveal looping, but in the webmaster this situation is alarming on new sites
5bb37c2fa56f3050230622.png
, and on old sites, this also begins to appear,
5bb37cc011f80178646844.png
and today there is a sharp drop by 20 positions.
What's wrong? help me figure it out please!
When trying to register a redirect according to the proposed
Nowhere extra redirects - I checked it all over the site.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2018-10-02
@xmoonlight

Replace
with
Well and download Screaming Frog Seo Spider and test it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question