PDA

View Full Version : Another add on - parked domain question



thicke
03-05-2006, 06:25 AM
Is there a way to have a parked domain point to an add-on domain?

P00r
03-05-2006, 03:10 PM
Is there a way to have a parked domain point to an add-on domain?

I think you have to unpark it and then make it an add-on, however there will be delay between the moment you unpark it and the time bluehost will accept to re-add as an add-on it to your account.

I do not know why there is delay, it may be DNS propagation but usually we get an error in regard to the DNS but since the error is an error maybe some admin could explain the whole process for everybody understanding

EX:
Using nameservers with the following IPs: 209.63.57.200,208.186.172.60
Sorry, the domain is already pointed to an IP address that does not
appear to use DNS servers associated with this server

If whatever.com is already registered, your name servers should be as follows:

Name Server: NS1.BLUEHOST.COM
Name Server: NS2.BLUEHOST.COM

Domain servers in listed order:
NS1.BLUEHOST.COM
NS2.BLUEHOST.COM

So it say they should be NS1 and NS2, they are and it act like if they werren't

May be related to dns propagation, or to some kind of protection they implement so that you do not put eroneous NS...

thicke
03-06-2006, 02:06 PM
Let me explain this a little more.

My account's main domain is "domainA.com". I have "domainB.com" parked, which points it to "domainA.com". I want to get "domainG.com" and have the parked "domainB.com" domain point to the add-on "domainG.com" domain. Since "domainG.com" is my fourth add-on, I can't convert "domainB.com" to a parked domain. I want the parked "domainB.com" domain to point to the add-on "domainG.com" domain. Does anyone know if there's a way to do this?

thicke
03-06-2006, 02:47 PM
I just spoke to someone in Tech Support about this (no, I called for something else....). They said the only way to do that was to make the parked domain an add-on domain. I guess I'll need to find another solution to this problem....

DrRx
03-08-2006, 06:13 PM
Let me explain this a little more.

My account's main domain is "domainA.com". I have "domainB.com" parked, which points it to "domainA.com". I want to get "domainG.com" and have the parked "domainB.com" domain point to the add-on "domainG.com" domain. Since "domainG.com" is my fourth add-on, I can't convert "domainB.com" to a parked domain. I want the parked "domainB.com" domain to point to the add-on "domainG.com" domain. Does anyone know if there's a way to do this?
Same problem for me, I need to know how to do?

felippe
03-09-2006, 12:38 AM
Parked domains are simply another line in the apache config file, under the "serveralias" directive, they are not their own virtual host. As such, it is not possible to point a parked elsewhere as it is already pointed to the virtual host it is part of. Only a virtual host can be pointed elsewhere. Addons are their own virtual host, so you can point them to other places.

DrRx
03-09-2006, 07:00 PM
Domain and subdomain pointing

Stop here! If you want to do domain pointing, before you even start with htaccess code, make sure your pointed domain name resolves to your main domain name default page. Many people think they have trouble with their htaccess code only to find the domain name is not properly pointed to their package in the first place. So make sure your pointed domain name works, resolving to your default page, before going any further. This is obviously not an issue if you are doing subdomain pointing.
--------------------------------------------------------------------------------
The examples below assume that your root public directory (where you would put this .htaccess file) is htdocs, which is the default setup for Apache. If your setup is different, then you may need to adjust the examples accordingly.

This approach has you code the first part of the domain or subdomain name and the associated subdirectory in your .htaccess file. For example:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{HTTP_HOST} ^(www\.)?name\.
RewriteRule ^(.*)$ subdirectory/$1 [L]

Note the second line has name, NOT name.com. And note that there are some restrictions when using this method.

*Domains and subdomains are treated exactly the same. The pointing is based on the first argument of the url. In this example name.com (as a pointed domain name) or name.domain.com (as a pointed subdomain) ends up at htdocs/subdirectory. This is particularly useful in certain situations, for example if you want the subdomains of more than one domain to point to the same place, or if you have both a .com and a .net domain name you want pointed to the same place.
*You must create a subdirectory under htdocs for every domain and subdomain you wish to be pointed. The subdirectory name is then coded into the htaccess file.
*The first argument in the url must be unique. You cannot have two domains or subdomains with the same name. sub.domain1.com and sub.domain2.com will both go to the same subdirectory.
*It defaults to allow www. as a prefix on any domain or subdomain.
*The htdocs directory is the "drop through" for any domain or subdomain not found. You may want to put an error not found page as the default page. Or, you could choose to have your main website be the "drop through" and just leave that one in htdocs.

There is also a simplified variation of this method that can be used in less complex situations where you are simply pointing a domain name and want ALL subdomains of that one domain to be pointed to a specific directory. In this example name.com and any subdomain (including www) of that domain would be pointed to htdocs/subdirectory:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{HTTP_HOST} name.com$
RewriteRule ^(.*)$ subdirectory/$1 [L]

In both examples, the htacess code works this way. The first two lines set up the Apache server rewrite process. Then you have two RewriteCond statements and a RewriteRule for EACH domain or subdomain you wish to point.
--------------------------------------------------------------------------------
There is a second approach where pointed domains and subdomains become automatic, meaning no specific code is required for each pointer. While this method is much easier to use and does not need to be modified when adding more domains or subdomains, note that there are some restrictions when using this method.

*Domains and subdomains are treated exactly the same. The pointing is based on the first argument of the url (except www if used).
*You must create a subdirectory under htdocs with a - at the front for every domain and subdomain you wish to be pointed. The directory name must match the first argument in the url (except for www if used). For example, domain.com would have htdocs/-domain and sub.domain.com would have htdocs/-sub and domain2.com would have htdocs/-domain2 etc.
*The first argument in the url, and therefore the directory name, must be unique. You cannot have two subdomains with the same name. sub.domain1.com and sub.domain2.com will both go to the directory htdocs/-sub
*You cannot have any other directory names that start with a - character.
*It defaults to allow www. as a prefix on any domain or subdomain.
*The htdocs directory is the "drop through" for any domain or subdomain not found. You may want to put an error not found page as the default page. Or, you could choose to have your main website be the "drop through" and just leave that one in htdocs.

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/-
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)
RewriteCond %{DOCUMENT_ROOT}/-%2 -d
RewriteRule ^(.*)$ -%2/$1 [L]

The htaccess code works this way. The first two lines set up the Apache server rewrite process. The first RewriteCond allows www. to be a prefix and captures the request name. The second RewriteCond checks for the existence of a subdirectory with the request name. The third RewriteCond ensures we are not caught in a looping operation. The RewriteRule rewrites the request with the subdirectory name (which was already verified).
Origin from B&T's Tips & Scripts http://tips-scripts.com/?tip=pointing#tip

thicke
03-09-2006, 07:37 PM
I never thought of that. A rewrite rule could be used to send traffic for the parked domain to the ad-on domain.....

piku
03-10-2006, 12:20 AM
Don't know if this is right or not. In terms of this


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{HTTP_HOST} ^(www\.)?name\.
RewriteRule ^(.*)$ subdirectory/$1 [L]

I am try to make it so that "www.BHdomain.com/addon_domain-dir" goes to "www.addon_domain-dir.com". So far, no luck. Advice, pointers, etc.? TIA

DrRx
03-10-2006, 10:39 AM
Don't know if this is right or not. In terms of this


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{HTTP_HOST} ^(www\.)?name\.
RewriteRule ^(.*)$ subdirectory/$1 [L]

I am try to make it so that "www.BHdomain.com/addon_domain-dir" goes to "www.addon_domain-dir.com". So far, no luck. Advice, pointers, etc.? TIA
I use another one htaccess code, and it works fine for me.


*Address bar is parked_domain*

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/addon_domain-subdirectory/
RewriteCond %{HTTP_HOST} ^parked_domain$ [OR]
RewriteCond %{HTTP_HOST} ^www.parked_domain$
RewriteRule ^(.*)$ addon_domain-subdirectory/$1 [L]

OR

*Address bar is addon_domain*

RewriteEngine On
RewriteCond %{HTTP_HOST} ^parked_domain$ [OR]
RewriteCond %{HTTP_HOST} ^www.parked_domain$
RewriteRule ^(.*)$ http://addon_domain/$1 [R=301,L]

Now you can make a parked domain pointed to an add-on domain.

piku
03-12-2006, 11:19 PM
@DrRx:

I think you misunderstood a bit. I'm actually not trying to point my main BHdomain.com to "addon_domain-subdirectory", and still have BHdomain.com on the address bar. Which what yours does.


I am trying to make it so that "www.BHdomain.com/addon_domain-dir" goes to "www.addon_domain-dir.com". ...and have the address bar say "www.addon_domain-dir.com" as well. Hope that clarifies it.

DrRx
03-13-2006, 01:38 PM
@DrRx:

I think you misunderstood a bit. I'm actually not trying to point my main BHdomain.com to "addon_domain-subdirectory", and still have BHdomain.com on the address bar. Which what yours does.

...and have the address bar say "www.addon_domain-dir.com" as well. Hope that clarifies it.

You can try below code


RedirectMatch permanent ^/addon_domain-dir$ http://www.addon_domain-dir.com
and this code can get it from the Redirect of cpanel.:D

OR point to anything from client request (RECOMMEND)


Redirect permanent /addon_domain-dir http://www.addon_domain-dir.com

piku
03-13-2006, 01:53 PM
Oh dammit =) ... I guess I got used to not trusting cPanel's upgrades in the previous years. Thanks.