Replace the default domain with a domain pointer (alias)

mmerlin

Verified User
Joined
Jul 26, 2004
Messages
75
Location
Melbourne, Australia
Hello,

I've searched the forum but can't seem to find an answer so looking for help with some ideas...

I've got a few situations on my server where it would be super-handy if I could somehow delete the default domain from a user account, but at the same time, convert its domain pointer (alias) to become the default domain.

Alternatively, the ability to swap the default domain with the domain pointer would be handy too.

In other words, I am looking for some way to promote a domain pointer to become it's parent domain.

Is this possible?

The reason for asking is I would like save the time and hassle of having to create a new user account, migrate the databases, scripts, file and directory permissions, and then deleting the old website.

Thank you for any advice or suggestions you might think of!
 
Perhaps I should not have used that term "default" domain, it is getting off track to the technical challenge. I think I was not clear in the first post. Let me try again...

Essentially here is the situation at the core

A user account has one domain: domain1.com

domain1.com
has a domain pointer (alias) which is domain2.com

The challenge is...

I want to delete domain1.com

and keep domain2.com as the new main domain.

Maybe another way to think of it is to promote domain2.com up to the status of a virtual site,
but at the same time, it is "taking over" the virtual site of the parent domain that it is a "domain pointer" to
 
i think you should just remove the pointer and then edit main domain and change it, isnt that easy?
Well the hassle is I need to move everything from
/home/user/domains/domain1
to
/home/user/domains/domain2

and re-create some custom symlinks and other script config variables

I guess that's the only way to do it, being realistic

Maybe it was just wishful thinking... expecting I could find a script to migrate everything for me :rolleyes:

Thanks for helping me clarify the situation
 
well yes, i was wrong :) But, using ssh you should just move /home/USER/domains/DOMAIN to /home/USER/DOMAINS/TEMP and remove the domain, create a new one, and move the data back.. ofc you will need to create mail symlink (cause path will be changed) and ftp accounts...

Sorry but i dont think exist an edit, but, i would suggest you to contact directadmin support, maybe they have some tips for do that.

Also, you should (if you want) try to post a feature request in that section.

Regards
 
All you have to do is remove the alias and then use change domain in domain administration to change it to the domain you want.
 
All you have to do is remove the alias and then use change domain in domain administration to change it to the domain you want.
PERFECT! :D

That is exactly what I needed, many thanks!

I hadn't noticed the "change domain" feature before, very handy.
 
Wow.. this is a useful old post!.. At least, almost for me..
I tried it with a domainpointer instead of an alias, but then when removing the 'default' domain, also the domainpointer (and all of it's dns-settings) are gone.
What to do when trying to move a domainpointer?.. (It is not visable in /home/USER/domains/DOMAIN)
 
Back
Top