| 12:10 am on May 7, 2013 (gmt 0)|
you were wrong..and this is the wrong forum..
| 3:48 am on May 7, 2013 (gmt 0)|
You can redirect from an entire domain, so why not a subdomain?
| 9:28 am on May 7, 2013 (gmt 0)|
welcome to WebmasterWorld, twprogrammers!
if i understand your question correctly it is certainly possible to redirect wildcard subdomains (*.example.com) to the example.com hostname assuming the DNS and web server are properly configured to handle wildcard subdomains.
| 1:50 am on May 8, 2013 (gmt 0)|
@Leosghost: Could you elaborate?
@lucy24: That's not what I meant. I meant redirect a not existent subdomain somewhere else.
@phranque: How would I configure it to redirect a specific subdomain that doesn't exist to a folder within my normal domain?
What started this was I went to the server/domain admin because I wanted to add a subdomain that pointed to a folder on the server so the user did not have to type www.domain.com/blablabla/abc/123 to get to the right place. But he said just "make a trap to redirect it to the folder" my side was the subdomain doesn't exist, it has not been added on GoDaddy, so how can you create a trap for a non-existent subdomain? I can understand files/folders that don't exist, because it has to do with the way the server is setup. But domains and subdomains are just aliases for IP Addresses, so if it's not registered how can you redirect from it?
| 4:15 am on May 8, 2013 (gmt 0)|
|I meant redirect a not existent subdomain somewhere else. |
It doesn't matter whether it exists or not. It only matters that the DNS points the request to the right server. The originally requested domain has to allow wild-card subdomains; otherwise you'll never get there. But if wild cards are enabled there should be no problem.
The essence of a redirect-- of any kind-- is that you're grabbing the request before it reaches its intended target. So it makes no difference whether the original target physically exists.
| 10:29 am on May 8, 2013 (gmt 0)|
|How would I configure it to redirect a specific subdomain that doesn't exist to a folder within my normal domain? |
how you do this depends on your specific configuration.
first you need to get the hostname resolved at the dns.
that means either adding name resolution information for that specific subdomain or configuring your dns for wildcard subdomains.
the specifics depend on your interface to the zone file editor for your dns provider.
then you need to add virtual host information to your server config for the specific subdomain or for wildcard subdomains.
the specifics depend on the type of server you are using and the interface to the server config by your web hosting provider.
then you need to add some rules to redirect requests for that specific subdomain to the subdirectory.
and what you may actually want is an internal rewrite to that directory or making the document root directory for that hostname the subdirectory in question.
the specifics again depend on the type of server you are using.
| 3:20 pm on May 8, 2013 (gmt 0)|
I have an Apache LAMP server. I do not have root access and I am not a sudoer, so I am unable to change files and folders outside my home folder. I am using GoDaddy for my domain and Rackspace for web hosting. I do not have access to GoDaddy either. From what I understand, correct me if I am wrong, phranque is saying I would have to have access to GoDaddy to "redirect" the non-existent subdomains. If this is true then neither one of us was right, because he was saying it could be done through server side scripting, or some other server side thing like the .htaccess file.
| 6:55 pm on May 8, 2013 (gmt 0)|
You don't need physical access to the config file. On shared hosting, you only need to find the clickbutton or cPanel area that enables the specified subdomain. If your hosting doesn't allow subdomains, you can't do it with the present host.
| 8:56 pm on May 8, 2013 (gmt 0)|
@lucy24: First, I host my domain with GoDaddy and my server with rackspace. Second, GoDaddy allows unlimited subdomains free of charge. Third, as I said in my previous post I do not have access to GoDaddy's cPanel or whatever its called.
| 3:18 am on May 9, 2013 (gmt 0)|
If the subdomain DNS resolution does not exists, then the browser request will never reach your server and execute your code to redirect in the first place, so that is the place to start as Phranque pointed out.
Wildcard Subdomains For GoDady [support.godaddy.com...]
| 5:55 am on May 9, 2013 (gmt 0)|
|I host my domain with GoDaddy and my server with rackspace |
i assume "I host my domain with GoDaddy" means GoDaddy is your domain registrar.
who is hosting your DNS?
if you do a whois or an nslookup you should be able to see your DNS servers and that should be a hint.
| 9:35 am on May 9, 2013 (gmt 0)|
|i assume "I host my domain with GoDaddy" means GoDaddy is your domain registrar. |
Yes I bought my domain from GoDaddy.
|do a whois or an nslookup |
This is probably a stupid, newbie question but do I use the domain or the IP Address that is pointed at by the domain?
I have never really used a whois outside an IRC, and then it does the work for me...
EDIT: Nevermind, I figured it out. Is this what you are looking for?
|Domain servers in listed order: |
This is the whole whois search:
|Registered through: GoDaddy.com, LLC (http://www.godaddy.com) |
Domain Name: EXAMPLE.COM
Created on: 16-Jul-12
Expires on: 16-Jul-13
Last Updated on: 16-Jul-12
Domain servers in listed order:
Registry Status: clientDeleteProhibited
Registry Status: clientRenewProhibited
Registry Status: clientTransferProhibited
Registry Status: clientUpdateProhibited
[edited by: phranque at 10:24 am (utc) on May 9, 2013]
[edit reason] no personal urls please [/edit]
| 10:23 am on May 9, 2013 (gmt 0)|
i believe that DOMAINCONTROL is GoDaddy's DNS hosting service, so you should be able to configure your wildcard subdomains or add a specific subdomain through your GoDaddy account or control panel.
| 10:26 am on May 9, 2013 (gmt 0)|
Dijkgraaf's reference should be helpful.
| 3:03 pm on May 9, 2013 (gmt 0)|
|i believe that DOMAINCONTROL is GoDaddy's DNS hosting service, so you should be able to configure your wildcard subdomains or add a specific subdomain through your GoDaddy account or control panel. |
That was the answer I was looking for (sort of).
Thank you guys for all the help.