• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Change main domain from website to redirection

CoyoteKG

Regular Pleskian
Hello,

I have one subscription for example domain.com with that website.
Now I want that domain to use like forwarder.
I can't find how to change from Hosting type from "Website hosting" to "Forwarding".

At the end, I will do that with .htaccess, but I'm wondered is it possible to change hosting type for existing domains?
I see that is possible for other domains, but for this "first" is not.
 
1. Put an .htaccess file into example.com and make redirection:

1.1 Create .htaccess file inside the domain's document root folder at Plesk > Domains > example.com > File Manager.

1.2 Edit content of the file making the redirection (e.g. to example2.com) manually:
Code:
# This allows you to redirect your entire website to any other domain
Redirect 301 / http://example2.com/

# This allows you to redirect your entire website to any other domain
Redirect 302 / http://example2.com/

# This allows you to redirect index.html to a specific subfolder
Redirect /index.html http://example2.com/newdirectory/

# Redirect old file path to new file path
Redirect /olddirectory/oldfile.html http://example2.com/newdirectory/newfile.html

2. Rename domain example.com into some arbitrary name at Plesk > Domains > example.com > Hosting settings and re-create new example.com as subdomain on the same document root.

Note: re-create mailboxes in new example.com and move mail into each new mailbox.

After that example.com can be configured as redirect without damaging webspace.

For more information: Unable to change hosting type of subscription.


If you have any further questions, let me know.
 
Back
Top