Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Poin new domain from wildcard subdomain

Discussion in 'Bind/DNS/Nameserver' started by andyajhis, Oct 23, 2018.

  1. andyajhis

    andyajhis Registered

    Joined:
    Oct 23, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Jakarta
    cPanel Access Level:
    Website Owner
    i have 2 domain.

    example, i have an account cpanel for example.com.
    and i was create Wildcard sub domain. any sub domain now available on example.com.

    and my second domain example is example.net.

    Now i want example.net access some wildcard domain from example.com. may be like hope.example.com.

    i have been point A record from myhope.com to IP server example.com. Now i must to addon domain example.net to cpanel, but i cannot choose same folder like wildcard doamin.
    What's should i do ?
     
    #1 andyajhis, Oct 23, 2018
    Last edited by a moderator: Oct 23, 2018
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello,

    Can you explain the issue you're having with this configuration/what isn't working? I set this up on my server and was successfully redirected to the wildcard folder.

    Here's what I did:

    1. Created an account with domain mydomain.com
    2. Created a wildcard subdomain with the document root _wildcard_
    3. Added an index.html in the _wildcard_ folder that read "this is only a test"
    4. Created an addon domain mydomain.net and used the _wildcard_ folder as the document root
    5. queried mydomain.net to ensure i got the "this is only a test" response
    Code:
    curl -vv collin.net
    * Rebuilt URL to: collin.net/
    *   Trying <MYIPAddress>...
    * TCP_NODELAY set
    * Connected to mydomain.net (<MYIPAddress>) port 80 (#0)
    > GET / HTTP/1.1
    > Host: mydomain.net
    > User-Agent: curl/7.54.0
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Date: Thu, 25 Oct 2018 18:42:15 GMT
    < Server: Apache
    < Last-Modified: Thu, 25 Oct 2018 18:37:08 GMT
    < Accept-Ranges: bytes
    < Content-Length: 20
    < Content-Type: text/html
    <
    This is only a test
    * Connection #0 to host mydomain.net left intact
    We can see I get the same response from the wildcard subdomain when queried I picked happy but you can use anything

    Code:
    curl -vv happy.mydomain.com
    * Rebuilt URL to: happy.mydomain.com/
    *   Trying <MyIPAddress>...
    * TCP_NODELAY set
    * Connected to happy.mydomain.com (<MyIPAddress>) port 80 (#0)
    > GET / HTTP/1.1
    > Host: happy.mydomain.com
    > User-Agent: curl/7.54.0
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Date: Thu, 25 Oct 2018 18:43:47 GMT
    < Server: Apache
    < Last-Modified: Thu, 25 Oct 2018 18:37:08 GMT
    < Accept-Ranges: bytes
    < Content-Length: 20
    < Content-Type: text/html
    <
    This is only a test
    * Connection #0 to host happy.mydomain.com left intact
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice