I added domain.com and www.domain.com as sites, it works normally, can be accessed with and without www

Then, on another site, let's say domain2.com, I added *.domain.com

Yes, that's right, I use the wildcard from *.domain.com on the domain2.com site, not on the domain.com site

So, I have 2 sites, domain.com and domain2.com

I put the wildcard from *.domain.com into the domain2.com site domain list, of course because that's my need.

However, there is 1 problem that arises.

domain.com is normal, but www.domain.com is directed to the domain2.com site

As if the Panel prioritizes the Wildcard (*), then the subdomain (www).

even though www.domain.com has also been registered on the domain.com site domain

Is there a solution? or maybe it can be fixed in the next update

    Hello,
    Add www.domain.com to domain name management? You can also try to create a site separately at www.domain.com and point to the same site directory

    andipedia

      aaPanel_Kern
      As I said, I added domain.com and www.domain.com first and both were working normally and pointing to the same site.

      Then I added domain2.com and www.domain.com.

      and everything was working normally and working fine

      Then, due to certain needs, I wanted to use the wildcard *.domain.com to a site along with domain2.com and www.domain.com

      Everything was working fine except www.domain.com

      after I added *.domain.com to domain2.com, www.domain.com also pointed to domain2.com

      it should have stayed with domain.com.

      I don't know, maybe AApanel thinks www is part of the wildcard, but that's silly, in general defined subdomains should come first, then wildcards

      aaPanel_Kern
      I tried as you said

      I removed www.domain.com from the domain.com site

      then made it its own site and pointed it to the same directory, the result is still the same, www.domain.com is taken to domain2.com

      So, obviously, it seems like the problem here is related to the priority order between defined subdomains and wildcard subdomains

      aaPanel_Kern

      yes, using cloudflare SSL.

      and as I said, before adding *.domain.com to the domain2.com site, everything was working normally, www.domain.com was running fine with domain.com

        Hi, can you give us your aapanel information? The server makes a snapshot backup first, if possible, please send it to kern@aapanel.com.
        It is recommended to fill in the following
        Post link:
        SSH IP address, account password and port:
        aapanel login link address and account password:
        Detailed problem description:

        No post link will not be able to know which user's information is, and the problem will not be processed

        andipedia

        Connect with us: 📨 Telegram 💬 Discord Email: support@aapanel.com