Now that you have learned how to create a configuration, it's time to test this configuration on your website and make sure everything is working as expected.
For integrating WebSonic.io, you will need to point your website domain to
For testing on local machine, you need to create an entry in host file. For example, your website is running on
www.example.com, then we will need to point it to
cdn.wsonic.net locally. In host file, you will need to make an entry as shown below. Please note that the IP below is just an example, continue reading to learn how to get the right IP depending upon your location.
Steps to get the IP address for
If on mac or linux, open Terminal. For windows, learn here about how to execute the dig command.
dig cdn.wsonic.net to get the IP address as show below. Choose any of the IP, for example -
126.96.36.199. Now use this IP to create an entry in host file as shown before.
MacBook-Pro-6:~ ***********$ dig cdn.wsonic.net; <<>> DiG 9.10.6 <<>> cdn.wsonic.net;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20007;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 4096;; QUESTION SECTION:;cdn.wsonic.net. IN A;; ANSWER SECTION:cdn.wsonic.net. 10278 IN CNAME d2c83k61tcw1r9.cloudfront.net.d2c83k61tcw1r9.cloudfront.net. 60 IN A 188.8.131.52d2c83k61tcw1r9.cloudfront.net. 60 IN A 184.108.40.206d2c83k61tcw1r9.cloudfront.net. 60 IN A 220.127.116.11d2c83k61tcw1r9.cloudfront.net. 60 IN A 18.104.22.168;; Query time: 215 msec;; SERVER: 22.214.171.124#53(126.96.36.199);; WHEN: Mon Jun 24 10:51:52 IST 2019;; MSG SIZE rcvd: 154
Once you have tested your website or app locally, it's time to go live. Create a CNAME record to point your website to
It's pretty common to run websites on root domains such as
example.com instead of
www.example.com. If you need to run WebSonic.io on root domain, you can leverage
Reach out to us at email@example.com if you need help.