Angular app cannot be accessed on webserver without prefix "www"

211 views Asked by At

i just deploying my first website with angular. the name of my website is

https://www.swargaflowertea.com.

it was a regular website tbh and nothing fancy. i have a problem when i tried to access my site with or without Schema "www".

if i try to access it without "www" like this :

https://swargaflowertea.com

it will giving null result (no data rendered and just a simple background).

the way i build it is by using this command

ng build --baseHref=https://www.swargaflowertea.com/ --deployUrl=https://www.swargaflowertea.com/

my site's has hashing routes.

mind anyone would know what's going on. thanks in advance

PS

just tell me the required data and i'll be happy to provide it. thanks

1

There are 1 answers

0
KrisnaRusdiono On

Fixed!. i just need to configure cPanel to redirect https://swargaflowertea.com/ to https://www.swargaflowertea.com/

that's all i have to do ...