Mobile app version of vmapp.org
Login or Join
Sent6035632

: Godaddy and domain connection I have a Godaddy hosting plan with a domain (let's use examplegodaddy.com). I use that as my main domain with a Wordpress site. I created a subdomain inside the

@Sent6035632

Posted in: #Domains #Godaddy #Subdomain #WebHosting #Wordpress

I have a Godaddy hosting plan with a domain (let's use examplegodaddy.com). I use that as my main domain with a Wordpress site. I created a subdomain inside the cpanel (let's call it example.com/subdomain) and installed wordpress on it. Tested it and it works okay.

Few years back, I purchased a domain from Name.com which I renew every year (let's call it examplename.com).

Now I want to use examplename.com as the address for the subdomain example.com/subdomain.

I've been able to configure the A records and nameservers to examplename.com so that it will point to example.com/subdomain. But what happens is that when I type examplename.com in the browser, the address becomes "example.com/subdomain"

Is there anyway to make the browser load the example.com/subdomain wordpress site but the address is "examplename.com" ?

I've been trying for almost a week and had no luck. I'm also new to hosting, domains, servers and other stuff related to this. Any help would be much appreciated. Thank you in advance for the answers!

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Sent6035632

3 Comments

Sorted by latest first Latest Oldest Best

 

@Murray432

In the control panel of examplegodaddy.com, go to Add-on domains and add examplename.com and link the domain to public_html/subdomain.

public_html may vary by name, but it is the root directory to examplegodaddy.com.

If you cannot access add-on domain, go to examplegodaddy.com directory, edit the .htaccess file to

RewriteRule ^/(.*)$ examplename.com/ [NC,L]

That should work.

10% popularity Vote Up Vote Down


 

@Correia994

If they are available on the Godaddy hosting plan, use cPanel addon domains. This will allow emails and other goodies too.

Navigate to addon domains. Fill in the first field (without the www), and it should generate a subdomain utility url/alias on top of the main server domain. For the document root, pick whatever folder you want, or the root public_html. In your case, it's the subdomain folder. Warning: if you pick the root public_html, then later decide to remove the addon/subdomain, DO NOT click delete the root dir. Doing so would wipe any sites under public_html. Same goes for FTP users on this new addon domain.

Ok now, what if Godaddy does not allow addon domains? Simple, just point the A record of examplename.com to the IP that runs your cPanel account. Then, since you are prob running Apache without access to vhosts, edit/or make a .htaccess file within the public_html alongside the subdomain folder.

in /public_html/.htaccess here is what a route would look like, dumping and masking the subdomain folder:

RewriteCond %{HTTP_HOST} ^(www.)?examplename.com$ [NC]
RewriteRule ^(.*+)$ subdomain/ [L,QSA]


Depending on what runs in that folder, you may need to adjust the apps .htaccess as well. Both the route, and perhaps the RewriteBase. Say Wordpress is running in /public_html/subdomain for example. In /public_html/subdomain/.htaccess you would need to change the rule for index.php from:

RewriteRule . index.php [L]

to this:

RewriteRule . index.php [L]

In order to pick up the route from the higher level /public_html/.htaccess. Then in that same file, change/add base for your subdomain folder. This is for relativity:

RewriteBase /subdomain

If all is well, it should "just work" via either method.

10% popularity Vote Up Vote Down


 

@Jennifer507

No the address is going to show the real address the webpage belongs to.

Your option is to copy the files from subdomain to the other examplename.com and redirect the subdomain to the new domain.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme