Access your website without www

Domain by godaddy and managed using netlify

Gaurav Dasgupta
5 min readMay 21, 2023

What was the Issue ?

I purchased by domain from godaddy for my personal portfolio by the name gauravdasgupta.com

I spent some time in playing around the web app . Started with Angular but then mood changed and built it again from scratch using React. But that’s a different story! Will be writing about this experience, may be in some other blog sometime.

After development I decided to host it and after some research and knowledge gained from some real good people I know on LinkedIn, I found out this amazing platform to built , deploy, manage domain settings and much more. Its called Netlify, which is already very popular among the developers, who love to quickly showcase their latest apps and other work on the web!

Next I spent some 2 days with netlify and hosted my application using the platform and configured it to use my domain from godaddy. Below is the Domain management dashboard .. how it looks

My site came up quickly and I was able to access it on https://www.gauravdasgupta.com

The problem started when I started distributing my website name to my friends, family and colleagues. I got the feedback that the users are not able to hit the application. I checked the deployment and the domain settings and everything looked fine. I started checking the problem as a user myself and got the problem that when I try to access my website by just typing gauravdasgupta.com on my browsers, its landing nowhere but to a godaddy default page. But next I saw that the problem is not huge and I can still survive with the URL https://www.gauravdasgupta.com embedded everywhere in my profiles, resumes, posts, etc. So I was lazy and was living with it for another 1 year almost!

But then what happened ? Did you solve it ?

Yes then one fine day when this problem suddenly popped up in front of me and I decided to solve it now without any delay. And as any other developer would do, I started the art of solving issues called “googling”. After reading some stackoverflow threads, godaddy and netlify support threads, I started connecting the dots and found out that the main issue is that I am missing the redirection of domain in my netlify configurations. So I started the Trial and Error method and below are the set of final steps I followed to get it working !

Final Solution

  1. On godaddy go to your domain portfolio

2. Click the spread button (3 dots …) next to the domain name and select “Edit Nameservers”. Earlier I used to have the default Godaddy Nameservers. Now I changed them to “I will use my own nameservers”. (see screenshot below)

3. Next to get the nameservers, on your netlify account you need to configure custom domain. If you have not already done it. Here are the those steps — https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/

4.After setting up the custom domain as the domain which we have from godaddy. In my case, gauravdasgupta.com. We will see the “Awaiting External DNS ” status next to the custom domian.

5. When we click on the above status we will get to see the custom nameservers provided by netlify. Now since my app is deployed/hosted on netlify and I want to use the domain taken from godaddy, I will have to go to my domain registrar(godaddy) and change my domain’s name servers to the following custom hostnames assigned to my DNS zone. (see screenshot below)

6. So as we understand by now, we have to copy these nameservers one by one and add them to the Edit Nameservers module of godaddy. (screen shown in step 2)

7. After step number 6, it might take around 24 hours for the DNS changes to propagate. Although in my case it was done within 30 mins.

8. Once the “Awaiting External DNS” status is resolved and vanished from the netlify custom domains section (discussed in step 4), next step is to solve the actual issue that my site is now accessible only using www in the URL. What we want is that my site should implicitly get redirected to www but the user should not provide the same while typing the URL. For this the article shared here gives the exact solution — https://answers.netlify.com/t/site-wont-open-without-www-managing-dns-through-netlify/9100

9. Finally along with www.gauravdasgupta.com, I also added the domain gauravdasgupta.com and marked it as the primary domain and made sure that in the config the secondary domain redirects automatically to the primary one (see screenshot below)

Remember….

As we are changing DNS configs and the changes need to get propagated among Netlify and Godaddy servers, sometimes you might face some delays in between some steps. So sometimes a little patience (max 10 mins) can help !

And now you can simply reach out to me via gauravdasgupta.com

This is my web app which is a single page app build solely using reactjs and it shows my content published on youtube, my resume, too many ways to reach out to me and in future it’s going to show much more creative content (which I am working on in my whenever found so called leisure time) !

--

--

Gaurav Dasgupta

A Software Developer at censhare. Javascript and AI enthusiast.. A learner by heart and crazy about building exciting stuff with the magic of programming !