How to browse domain,com and get sub,domain,com also with masking

Discussion in 'HOWTO-Related Questions' started by adamjedgar, Nov 15, 2019.

  1. adamjedgar

    adamjedgar Member

    Hi guys,
    What's the best way to achieve browsing however get but display in browser as (masking?)

    I have an old website that is to be redeveloped. Currently website is
    I have made a copy of it on a new server on

    What I want to do is move the DNS so that when browsers type they are directed to for all pages on the website, however i want their web browsers to display

    Is the way to do this add a came record as follows...

    1. CNAME (can I even do it this way?) And 2. then on joomla add htaccess url mask to display in web browsers?

    Or, do I
    1. change A record for to point at new server (, then
    2.add htaccess redirect in that vhost to with
    3. a url mask so browsers display

    Is this a url forward or a url redirect when and is the same primary domain?

    Also, can url mask be done in DNS?
  2. Steini86

    Steini86 Active Member

    There are two different things:
    DNS tells the users browser which server to ask for a site. Then the server has to decide, which pages it delivers to the user. So what you want is that no matter the user asks for domain or sub.domain gets the same page. This has to be done in the webserver.

    If you really want to "mask" the domain, you need a proxy. I think you want to have a look at rewrite.
  3. adamjedgar

    adamjedgar Member

    Ok so that means its the following...
    In dns CNAME

    Then the htaccess rewrite so displays all pages as

    How does joomla config file affect the htaccess rewrite...for example I think currently it has website url as this prevent the rewrite from working? If so, what should I change it to?

Share This Page