I bought a domain from HostGator in April or so. I can add on domains. I would like my subdomain for my fansite (lets call it sub.domain.net) to point to sub.net. As in the subdomain to be its own domain. The people at HostGator said this is possible. I was told by someone that I’d have to use .htacess to do it. How might I go about pointing a subdomain to its very own domain url?
‘Hope this makes sense.
Next: Website Design – How Do I Do This?
Previous: How To Hide My Info From The Whois Database When Registering A Domain Name?
"How Can I Point My Subdomain To A Domain?" was posted on Monday, July 13th, 2009 at 3:03 pm.
One Response to “How Can I Point My Subdomain To A Domain?”
Leave a Reply
You can make this with redirect but then the subdomain will not appear and you will be completely redirected.
Or when you create your subdomain through cpanel you can use the document root that the domain has. So the subdomain will call the document root of your domain.
And you can use the below htaccess
Options +FollowSymLinks
RewriteEngine on
#
# Redirect blog.example.com to http://www.example.com/blog
RewriteCond %{HTTP_HOST} !^blog.example.com
RewriteCond %{HTTP_HOST} .
RewriteRule (.*) http://www.example.com/blog/$1 [R=301,L]
#
# Redirect client requests for index.htm to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /([^/]+/)*index.htm HTTP/
RewriteRule ^(([^/]+/)*)index.htm$ http://www.example.com/$1 [R=301,L]
#
# Redirect non-www to www
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]