• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

301 redirect domain without www to www with multiple domains

chris81

New Pleskian
301 redirect domain without www to www with multiple domains


I have a domain package for a complete new project:


onetwothree.com
one-twothree.com
one-two-three.com

onetwothree.net
one-twothree.net
one-two-three.net


I have to use 1 of them as main domain for best SEO results

"one-two-three.com"


now there are some little things to do:

a)

all domains should use 'www.' - but if these domains are trying to be used without 'www.' they should also redirect to 'www.'

b)

all domains should redirect to the main domain via 301




how to be able to do that !?
 
Hi chris81,

Such redirects can be configured using Apache/mod_rewrite redirect rules. You can define own redirects and put them into .htaccess file in the vhost's doc root . As example, redirect from non-WWW to WWW:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^DOMAIN.TLD [NC]
RewriteRule ^(.*)$ http://www.DOMAIN.TLD$1 [L,R=301]
</IfModule>

FYI, upcoming Plesk releases will help you with such kind of WWW/non-WWW redirects.
 
Back
Top