• 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 How to point addon domains to same httpdocs main directory?

dviolante

New Pleskian
Hello, i need to migrate my WordPress Multisite to a new server with Plesk. Actually this WordPress MU (cPanel) have 5 different domains (Main domain and 4 addon domains) that are pointing all of them to the same public_html directory. But in plesk when i add a new domain, Plesk dont let me point the new domains to the httpdocs main directory.

Is any way to achieve this? it is totally necessary that all of the new domains points to the httpdocs main directory.
In the following image you can see how all of the addon domains are pointing to the same root directory with cPanel (the server i will cancel).

Any help?
Thanks


same-main-directory.png
 
You can set the same path for all the domains, add a subscription for the main domain and add all addon domains under that subscription:
1584118701412.png

1584118755136.png
 
No, don't do that. It's only a valid solution on the surface, but it can have severe consequences. We have seen that this affects the backup and restore behavior. When several domains point to the same document root, it is possible that the content of that document root cannot be restored through the Plesk built-in restore functions from Plesk backups. It seems that on restores, occasionally one domain "with content" is restored while the other domains pointing to the same directory remove that content again - or that none of the content is restored. In such cases here the only solution was to dive into the backup archives directly and copy the files from there manually. This might not happen always, but I have seen the behavior at least twice on different machines. I have also seen that deleting one of the domains that are pointing to the same document root has removed the document root while the other domains pointing to the same document root where left orphaned (with the missing document root directory). Another bug that cannot easily be reproduced, but I am sure that it has happened here before.

Instead: The proper solution is to add the add-on domain as an "alias" with "Add Alias" button. Then the domain automatically behaves as if it had the same document root and all the "delete" and "backup/restore" operations are perfectly safe.
 
You can set the same path for all the domains, add a subscription for the main domain and add all addon domains under that subscription:
View attachment 16527

View attachment 16528

Hello! Thank you for your reply! And my mega late response. I tried what you told me but im redirected to main domain.
I tried this in the Document root

httpdocs => and it redirects me to my main domain. I need to keep the addon domain.

If i type addondomain.com im getting redirected to maindomain.online

Any advice?
Thanks
 

Attachments

  • online-Plesk-Obsidian-18-0-29.png
    online-Plesk-Obsidian-18-0-29.png
    16.4 KB · Views: 20
No, don't do that. It's only a valid solution on the surface, but it can have severe consequences. We have seen that this affects the backup and restore behavior. When several domains point to the same document root, it is possible that the content of that document root cannot be restored through the Plesk built-in restore functions from Plesk backups. It seems that on restores, occasionally one domain "with content" is restored while the other domains pointing to the same directory remove that content again - or that none of the content is restored. In such cases here the only solution was to dive into the backup archives directly and copy the files from there manually. This might not happen always, but I have seen the behavior at least twice on different machines. I have also seen that deleting one of the domains that are pointing to the same document root has removed the document root while the other domains pointing to the same document root where left orphaned (with the missing document root directory). Another bug that cannot easily be reproduced, but I am sure that it has happened here before.

Instead: The proper solution is to add the add-on domain as an "alias" with "Add Alias" button. Then the domain automatically behaves as if it had the same document root and all the "delete" and "backup/restore" operations are perfectly safe.




Hello, i tried with Add Alias, but when i enter to my addon domain, im getting redirected to main domain. I need to keep the addondomain in url.
Any advice?
Thanks
 
Last edited:
Some applications like Wordpress save their own URL in their database and redirect to that URL. So if you have Wordpress installed on the domain, it is likely the reason why all requests are redirected to another URL. Check you "siteurl" and "homepage" settings in the "wp_options"-table of the database. There may be other applications that do the same. Also check your .htaccess file in your document root directory whether it has rewrites. These might also cause the redirect.
 
Some applications like Wordpress save their own URL in their database and redirect to that URL. So if you have Wordpress installed on the domain, it is likely the reason why all requests are redirected to another URL. Check you "siteurl" and "homepage" settings in the "wp_options"-table of the database. There may be other applications that do the same. Also check your .htaccess file in your document root directory whether it has rewrites. These might also cause the redirect.

Hello Peter, thank you for your response.
I did some tests with new domains, and using no CMS, and using Alias Domains is working perfect. I will check WP and .htaccess

Than you!
 
No, don't do that. It's only a valid solution on the surface, but it can have severe consequences. We have seen that this affects the backup and restore behavior. When several domains point to the same document root, it is possible that the content of that document root cannot be restored through the Plesk built-in restore functions from Plesk backups. It seems that on restores, occasionally one domain "with content" is restored while the other domains pointing to the same directory remove that content again - or that none of the content is restored. In such cases here the only solution was to dive into the backup archives directly and copy the files from there manually. This might not happen always, but I have seen the behavior at least twice on different machines. I have also seen that deleting one of the domains that are pointing to the same document root has removed the document root while the other domains pointing to the same document root where left orphaned (with the missing document root directory). Another bug that cannot easily be reproduced, but I am sure that it has happened here before.

Instead: The proper solution is to add the add-on domain as an "alias" with "Add Alias" button. Then the domain automatically behaves as if it had the same document root and all the "delete" and "backup/restore" operations are perfectly safe.
Isn´t a solution if you need separate mailboxes per domain in one wp multisite installation for example. Aliases domains dont allow have separate mailboxes (only the alias email pointing to primary domain)´.

If Plesk had a solution for individual mailboxes per alias domains it would be the perfect solution.
 
Back
Top