1

Topic: Is it possible to make a subdomain redirect?

If i have my DNS hosted in here, is it possible to create a subdomain and redirect it to another site, considering that this one isn't local.
For example: subdomain.my.domain -> another.site/dir

Re: Is it possible to make a subdomain redirect?

Hi,

eadwardus wrote:

If i have my DNS hosted in here, is it possible to create a subdomain and redirect it to another site, considering that this one isn't local.
For example: subdomain.my.domain -> another.site/dir

If by redirect you mean reverse proxy, then by the help of a PHP proxy I see no reason it should not work. You will have to set it up yourself though and we only allow it if the subdomain is about what we accept to host.

Sylvain

3

Re: Is it possible to make a subdomain redirect?

gradator wrote:

Hi,
If by redirect you mean reverse proxy, then by the help of a PHP proxy I see no reason it should not work.

In my case i mean expanding the url to another one, i'm hosting the files in another server, but i wanted to use my domain, so would be something like:
call: downloads.mydomain/dir/file -> downloads.anothersite/dir/file

In this case is it possible to do without asking for another web space? (only with the DNS)

gradator wrote:

You will have to set it up yourself though and we only allow it if the subdomain is about what we accept to host.

It's a repository of packages, all of them are open source, but i will only redistribute them in binary form

Re: Is it possible to make a subdomain redirect?

eadwardus wrote:

In my case i mean expanding the url to another one, i'm hosting the files in another server, but i wanted to use my domain, so would be something like:
call: downloads.mydomain/dir/file -> downloads.anothersite/dir/file

In this case is it possible to do without asking for another web space? (only with the DNS)

First things first: DNS only deals with domains, not full HTTP URLs.
So, in your case... well, it depends. In your example, the HTTP request URI is left untouched (/dir/file remains /dir/file) so you could handle this with DNS only if (and only if) the target web server (downloads.anothersite) correctly handles HTTP requests bearing this header: "Host: downloads.mydomain". And if you want HTTPS (who doesn't nowadays?) then the target web server should also have the adequate certificate to handle requests for downloads.mydomain.

Assuming all of this failed, the best way to proceed consists in:

  • Handling the "mydomain" DNS domain somewhere (e.g. at TuxFamily's)

  • Creating the "downloads" subdomain and making it point to TuxFamily's web servers: a CNAME to web.tuxfamily.org will do

  • Creating the "downloads.mydomain" web area

  • Generating the adequate HTTP redirects through this web area, typically using a .htaccess file

eadwardus wrote:

It's a repository of packages, all of them are open source, but i will only redistribute them in binary form

That should be okay.

Re: Is it possible to make a subdomain redirect?

I agree with xavier here, if the goal is to distribute packages and your remote host does not allow using a custom domain, then a simple HTTP(S) redirect should do the job, no need for a reverse proxy.

Sylvain