FastDomain修改Primary Domain

| No Comments | No TrackBacks

一直以来,Primary Domain都是,guduo.net是作为Addon Domain来管理。但几年下来,都是使用的guduo.net的域名,yimutian.net的域名没有使用,暂时也没有继续使用的计划,所以也就想把guduo.net作为Primary Domain进行管理了。

How to change the Primary Domain

What to do before renaming your account

  1. The rename Process normally takes from 20 minutes to 5 hours, depending on the size of the account.

  2. The domain you are changing to must be associated with the account first.

  3. The current main domain can never become the main domain again.

  4. The current account's username, password, files, databases and e-mails will remain unchanged.

  5. The new primary domain will point to the public_html directory itself, the same way the main domain does currently.

  6. The website files may need to be moved into the public_html directory and out of the public_html directory, to correspond with the new primary domain and assignment of the old primary domain to a subfolder. 
    Please note that this will be your responsibility to do, and may cause some site files, scripts or other applications to break, requiring modification to work with the new site location.

  7. Custom DNS entries will be deleted for both domains involved in this change and will need to be recreated after the rename is complete.

  8. If you have an SSL certificate, please note it will only work for the main domain; if the SSL was purchased through our cPanel, it will automatically be revoked for the original domain, and re-assigned to the new primary domain. 
    Note: This most often will only take a few minutes, but could take up to a few hours.

  9. Although renaming an account should not move or delete any files on the account, we do recommend creating/downloading a backup of all files and databases prior to requesting the rename. Please Click Here for information about creating and downloading backups.

  10. The new primary domain must be registered to you. If needed, you may register new domains for $13.99 each, per year, via the Domain Manager in the cPanel.

How to host the Primary Domain from a subfolder (.htaccess)

You will want to insert the following code block and make modifications as noted in the (#) comments. You will need to change the two instances of to your domain, and the three instances of subdirectory to the folder where you want your site.

# .htaccess main domain to subdirectory redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.
# Do not change this line.
RewriteEngine on
# Change to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?$
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/subdirectory/
# Don't change these line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /subdirectory/$1
# Change to be your main domain again.
# Change 'subdirectory' to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteRule ^(/)?$ subdirectory/index.html [L]

Visitors to your Web site will not be able to tell that your main domain is using a subdirectory, they will still see the Web site address as

Note: This will not work with some website software. You will also need to modify the $base_url$live_site or other configuration settings in those to finish the process.





No TrackBacks

TrackBack URL:

Leave a comment


May 2016

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by 谷多 published on December 17, 2012 10:06 PM.

R1 的transmission版本问题 was the previous entry in this blog.

物尽其用:让iPhone通过ssh上网 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.