Depending on your DNS registrar, a CNAME record isn’t always included in your records. If you are able to access your domain without “www.”, but not with “www.”, this indicates that you are missing a CNAME record.
The CNAME record you need to add into your DNS Manager is as follows:
Name (host): www
Value (points to): "yourdomainname.com" or "@", depending on what your registrar allows
TTL: 600 or 3600 (depending on what your domain registrar allows)
Note: DNS changes can take up to 24-48 hours to complete but are typically noticed sooner.