3.1.10. Web redirect

Important points:

  • Web redirect supports HTTP and HTTPS.
  • The domain must be served on our NS.
  • Redirects only work for the main domain with www and without www. Other subdomains are not affected.
  • When web redirect is enabled, the A and AAAA DNS records set for the main domain with and without www are ignored.

Using the web redirect, you can set up redirection of visitors to another address without having a site on the hosting.

  1. Open the "Web redirect" section.
  2. Specify the redirect settings and save the changes:
    • Redirect type:
      • Don't use web redirect — web redirect is disabled.
      • Direct redirect — a redirect with a change in the URL in the visitor's browser address bar.
      • Hidden redirect — a redirect without changing the URL in the visitor's browser address bar.
        • The content of the target URL will be loaded into a frame that occupies the entire page area.
        • Redirection from HTTP to HTTPS will only be performed if the target URL begins with https://.
        • ⚠️ Cannot be enabled if the target address response returns the X-Frame-Options: DENY header, which prohibits the page from being loaded in a frame.
    • Redirect settings:
      • Redirect URL — the address to which the visitor should be redirected.
      • HTTP redirect code (only for direct redirect) — which code to use for the redirect (301 — permanent redirect, 302 — temporary).
      • Redirect requests to a similar page of the specified site — enable this option if you want the redirect to go to the same page that was requested, rather than the home page of the target site.
      • Redirect requests only for the domain without www — enable this if you want the redirect to be performed only for the main domain without www (for example, when the main domain is pointed to one service and the www subdomain to another).
  3. Wait approximately 30-60 minutes for the changes to take effect.

If, for any reason, a web redirect is not suitable for the task at hand, then, if you have an ordered hosting service, you can set up a redirect via a site hosted on that service.

To organize a redirect using a separate site, do the following:

  1. Disable web redirect (if enabled).
  2. Add a site with the domain name in the "My sites" section (if not added).
  3. Install an SSL certificate for the site (if not installed).
  4. In the site root directory, place the .htaccess file with redirect directives to another site.

To organize a redirect using the alias of an existing site, do the following:

  1. Disable web redirect (if enabled).
  2. In the settings of an existing site hosted on our platform, add the domain name from which the redirect should be executed to the aliases in two versions — with www and without.
  3. Issue a new SSL certificate, selecting the added aliases.
  4. In the site root directory, edit the .htaccess file and add the following redirect directives to the beginning of the file:
    • Redirect from one domain to another:
      RewriteEngine On
      RewriteBase /
      RewriteCond %{HTTP_HOST} ^(www.)?source.com [NC]
      RewriteRule ^(.*) https://www.destination.com/ [L,R=301]

      Replace source.com with the domain from which the redirect should be executed (it was added as an alias), and replace www.destination.com with the domain to which the redirect should be directed.

    • Redirect from several domains to one other:
      RewriteEngine On
      RewriteBase /
      RewriteCond %{HTTP_HOST} ^(www.)?(source1.com|source2.com) [NC]
      RewriteRule ^(.*) https://destination.com/ [L,R=301]

      Replace source1.com and source2.com with the domains from which the redirect should be executed (they were added as aliases), and replace www.destination.com with the domain to which the redirect should occur.

    • Redirect from several domains to several others:
      RewriteEngine On
      RewriteBase /
      RewriteCond %{HTTP_HOST} ^(www.)?source1.com [NC]
      RewriteRule ^(.*) https://www.destination1.com/ [L,R=301]
      RewriteCond %{HTTP_HOST} ^(www.)?source2.com [NC]
      RewriteRule ^(.*) https://www.destination2.com/ [L,R=301]

      Replace sourceX.com with the domain from which the redirect should be executed (it was added as an alias), and replace www.destinationX.com with the domain to which the redirect should be directed.

Content

    (1)