0

On VPS, it seems I can use <VirtualHost> to redirect any subdomain to main domain. On shared host, since I cannot edit the apache configuration file, how can I do?

Currently, I create a CNAME record for *.mydmain.com to redirect to mydomain.com. But When I visit nonexist.mydomain.com, it lands on nonexist.mydomain.com/cgi-sys/defaultwebpage.cgi.

William
  • 99
  • 1
  • 2
  • 11

1 Answers1

2

You normally need to do this with the control panel level. For example Cpanel, DirectAdmin, etc.

Refers to the user manual for them and/or contact your Shared Hosting Provider. As it's a function concern, it's industry standard to include this as part of the contract for the service.

Rickuku
  • 344
  • 1
  • 5
  • 1
    I am using CPanel. Can you please tell me which function in CPanel I can use to do this? Thank you! – William Dec 28 '20 at 05:16
  • 1
    Most certainly! Their Redirection would most likely be of use as explained in https://docs.cpanel.net/cpanel/domains/redirects/ . Hope that helps! – Rickuku Dec 28 '20 at 13:58