How do I get my SCA site to work with non www when entered into address bar?
I have a Suite Commerce Advanced website that doesn’t redirect correctly with when www is not entered into the address bar.
I’ve looked in the NS configurations but may have missed something. Or, perhaps it’s a domain registrar setting.
As previously mentioned, you can either do this using a URL redirect or you can create a CNAME entry in your DNS settings. Here is an example of how to set this up if your hosting is through 123-reg but most providers tend to act pretty similar.
To get it working you’ll want to add an entry where this hostname is “@”. I believe the alias will be the same as your other CNAME record with the www.
My DNS account didn’t like me adding the @ CNAME record.
I created a second Domain in NetSuite, as a redirect to the www domain, and it gave a CNAME of eg: [domain.com.hostning.netsuite.com]
I then pinged [domain.com.hosting.netsuite.com] to get the IP, then used an ‘A’ entry on the DNS record using that IP address
For something this ‘simple’ it is best to do it with your domain host rather than rely on NetSuite. Some hosts have settings in their control panels specifically for this scenario, while others grant you access to write custom redirect rules.
There are some suggestions here saying that you should write a static A record pointing to a NetSuite IP address and while that may well work, I do want to point out that there are a number of pitfalls with this approach that we document here:
- NetSuite IP Address: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_n251955.html
- Website Domains and Email Hosting: https://developers.suitecommerce.com/section4322255829
You can use your root domain however, usually this domain is configured as an A record.
A Record is not a type that SCA encourages us to use due to the usage of CDN. If possible in your DNS provider, you may use the root domain and use CNAME instead — this type, would allow you to use the *.hosting.netsuite.com CNAME (ALIAS) and would ensure that your domain is data center agnostic and ip address friendly on having Custom Secured domain and/or CDN enabled.