Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Support wildcard subdomain with DirectAdmin
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Support wildcard subdomain with DirectAdmin

o_be_oneo_be_one Member
edited May 2021 in Help

Hello all,

i would like to know if there is a way to have *.mydomain.tld pointing to Yourls with DirectAdmin (DA)? In DA i can't add *.mydomain.tld as "subdomain", only in "dns".

If it's not possible i've thinked about a "catch all" like folder for a domain, but haven't seen any way to do that.

(update) Technical informations:

  • i use CloudFlare
  • i've already a wildcard subdomain in my DNS zone
  • this usecase is currently working with CPanel (provider = BuyShared)
  • i'm moving from CPanel to DirectAdmin (provider = MyW)

Thanks a lot for your support, hope i will get double bandwith as answer!

Comments

  • RickBakkrRickBakkr Member, Patron Provider, LIR
    edited May 2021

    @o_be_one said: In DA i can't add *.mydomain.tld as "subdomain", only in "dns".

    You cannot explicitly add it, just use ServerAlias *.mydomain.tld in your VirtualHost of main domain or whichever VHost you want it to reach? (or more neat: ServerAlias *.|DOMAIN| to make DA parse the domain).

    If you need help, please DM and I'll be happy to help you out.

    Thanked by 1o_be_one
  • o_be_oneo_be_one Member
    edited May 2021

    @RickBakkr said: You cannot explicitly add it, just use ServerAlias *.mydomain.tld in your VirtualHost of main domain or whichever VHost you want it to reach? (or more neat: ServerAlias *.|DOMAIN| to make DA parse the domain).

    Thanks a lot for your offer. It's a shared hosting at myw ( @MikePT ) so i can't edit it on my own. If i get more answers i will refer to this post in my currently opened ticket to help them better understand my use case (ticket = 503936).

    I hope i can get a way to do it on my own, as more and more web providers use DA ^^.

    Edit: got answer asking for folder and subdomain, then i guess it confirms i can't do it on my own

  • ShakibShakib Member, Patron Provider

    I did that using cloudflare dns. *.hostcram.com works. :)

  • @Shakib said: I did that using cloudflare dns. *.hostcram.com works.

    Yes but since the web hosting is on DA, webserver behinds needs to know where to point the subdomain (what folder). This is the part i can't do ^^.
    (i'm already set with CloudFlare and CPanel, wildcard works, but i'm moving my hosting to DA)

  • ShakibShakib Member, Patron Provider

    @o_be_one said:

    @Shakib said: I did that using cloudflare dns. *.hostcram.com works.

    Yes but since the web hosting is on DA, webserver behinds needs to know where to point the subdomain (what folder). This is the part i can't do ^^.
    (i'm already set with CloudFlare and CPanel, wildcard works, but i'm moving my hosting to DA)

    How about dedicated IP? 🤔

    You can easily point your wildcard subdomains to a dedicated IP.

  • AbdAbd Member, Patron Provider

    @o_be_one you can use Directadmin + external DNS service (like Cloudflare) to achieve this I guess.

  • @WebHorizon said: external DNS service (like Cloudflare) to achieve this I guess.

    Thank you for your answer, I understand my post lacked some informations so i've added a technical part. I already use CloudFlare and use a wildcard but i'm moving from CPanel, where my usecase is working, to DirectAdmin, where i need it to work.

  • ShakibShakib Member, Patron Provider

    Try dedicated IP. It will work.

    @o_be_one said:

    @WebHorizon said: external DNS service (like Cloudflare) to achieve this I guess.

    Thank you for your answer, I understand my post lacked some informations so i've added a technical part. I already use CloudFlare and use a wildcard but i'm moving from CPanel, where my usecase is working, to DirectAdmin, where i need it to work.

  • o_be_oneo_be_one Member
    edited May 2021

    @Shakib said: You can easily point your wildcard subdomains to a dedicated IP.

    Have you already used a web shared provider? Web hoster put you on one of their shared web server, whiich has 1 or more dedicated IPs ; you are attributed 1 of those IP and it doesn't matter much if it's shared since in any case you use the shared web server. This IP only change if you request or if they need to move your web space for X reason. In my case as i've a lot of subdomains (big project) i used a CNAME so in CloudFlare i've an entry like : *.mydomain.tld. IN CNAME webX.region.provider.mydomain.tld. (TTL 600), where webX.region.provider.mydomain.tld is webX.region.provider.mydomain.tld. IN A <web ip> (TTL 600).

  • ShakibShakib Member, Patron Provider

    @o_be_one said:

    @Shakib said: You can easily point your wildcard subdomains to a dedicated IP.

    Have you already used a web shared provider? Web hoster put you on one of their shared web server, whiich has 1 or more dedicated IPs ; you are attributed 1 of those IP and it doesn't matter much if it's shared since in any case you use the shared web server. This IP only change if you request or if they need to move your web space for X reason. In my case as i've a lot of subdomains (big project) i used a CNAME so in CloudFlare i've an entry like : *.mydomain.tld. IN CNAME webX.region.provider.mydomain.tld. (TTL 600), where webX.region.provider.mydomain.tld is webX.region.provider.mydomain.tld. IN A <web ip> (TTL 600).

    Good 👍

  • SollizSolliz Member

    <3 I'll learn it

Sign In or Register to comment.