Domain Alias always redirects? — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberHosting

Domain Alias always redirects?

Hi,

If I go to "Manage" the domain for domain a.com and I make an "Alias Domain" b.com I always get redirected to https://a.com when trying to view https://b.com

I also use ISPConfig, and when I use a domain alias there, and if I would go to https://b.com I would see a.com, but b.com would be in my browsers address bar. When I try this with cyberpanel it always redirects to a.com.

Is this how cyberpanel behaves when using domain aliases? Because if that is the case you could use simple redirects as well. I don't think that this is the right behaviour for this function.

Is there a way to do this right?

Comments

  • it sounds like the other thing was doing some kind of iframe vs an alias.

    Why don't you try putting something like this on b.com for the index.html page

    this should then show b.com in browser but the content from a.com or whatever is in the ifram source

    <html>

    <head>
    <title>Some Page Title</title>
    </head>

    <style>
    body {
    margin: 0;
    padding: 0;
    }
    body, iframe {
    width: 100%;
    height: 100%;
    }
    iframe {
    border: 0;
    }
    </style>

    <body>
    <iframe src="https://a.com"/>
    </body>

    </html>
  • edited February 10
    Thank you @whattheserver I appreciate it very much.

    The idea of a Domain Alias is really that you can type b.com in your browser bar, and see a.com.

    I found a way to do this. In the DNS I made an A record for the domain pointing it to the IP address of the server. That didn't work. But when I make a CNAME for b.com pointing to a.com it works good.

    This way you can pretend to have many many websites, while making only 1...
  • If you need domain aliasing, it's much easier to "Add Domains" instead of using "Aliases". Simply define 'public_html' as the document root, and it will work as you are expecting. That is especially useful if you need SSL certificates for your domains, as this will generate independant SSL certificates for any added domains.
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

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