A
A
Alexander2016-01-26 16:07:45
Search Engine Optimization
Alexander, 2016-01-26 16:07:45

SEO question on http and https protocols. How to make sites appear using two protocols?

Friends, please tell me the answer to the following question regarding the installation of the https certificate:
How to make the site open using two protocols? Now, if you open a site via http, it redirects to https, and if you disable redirection in the browser, the hosting page opens (the http version of the protocol remains).
I check the site through http://pr-cy.ru/a/moysite - in the site's indicators, zeros are everywhere (this service does not seem to redirect if the site has a redirect to another domain, and does not display the indicators of the new domain). + the hosting page is displayed in the screenshot. I check pr-cy.ru/a/vk.com - everything is displayed perfectly, all indicators of the https protocol are indicated.
I need the site to display correctly using two protocols, followed by a redirect to https.
I would be very grateful for your tips on solving this problem. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zooks, 2016-01-26
@zooks

You need to remove the redirect in htaccess, if it exists. For other questions, contact the host.
It usually looks like this:

RewriteEngine On
RewriteBase /

RewriteCond %{SERVER_PORT} !^443
RewriteRule (.*) https://example.com/$1 [R=301,L]

V
Vyacheslav Razbitsky, 2016-02-04
@RaSla

Remove the "HTTP -> HTTPS" redirect - and you will have a site using both protocols.
However, keep in mind:
1) The whole world, on the contrary, is switching to HTTPS-only (HTTPS-primary);
2) SEO-promoters recommend using ONE (main version of the site), and from other versions ( www. https://www. etc.) make permanent redirects to the main version of the site.
nginx/sites-enabled/_xxx_.conf:

### _xxx_ - HTTP ###
server {
  server_name _xxx_;
  listen 80;

  access_log /var/log/nginx/_xxx_-http-access.log  combined  buffer=4k flush=5s;
  error_log  off;

  root       /var/www/html;

## ALLOW Let's Encrypt verification
  location ^~ /.well-known/ {
    root   /tmp/.well-known;
    allow  all;
  }
## ALL another - redirect to HTTPS
  location / {
    return 301 https://_xxx_$request_uri;
  }
}

### _xxx_ - HTTPS ###
server {
  listen 443 ssl http2; # http2 - 1.9.5+
  server_name  _xxx_;

  include conf.d/_https.conf.ssl; # common security params for ANY https site
  ssl_certificate_key     /etc/letsencrypt/live/_xxx_/privkey.pem;
  ssl_certificate         /etc/letsencrypt/live/_xxx_/fullchain.pem;
  ssl_trusted_certificate /etc/letsencrypt/live/_xxx_/chain.pem;

  access_log /var/log/nginx/_xxx_-https-access.log  combined  buffer=4k flush=5s;
  error_log  /var/log/nginx/_xxx_-https-error.log  error;

  root       /var/www/_xxx_/web;
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question