I’m new to all this, so I’ve been struggling. I bought a domain on Namecheap for a full-stack app that I made and initially deployed on Heroku, and I’m trying to get my custom domain working properly with Cloudflare. I’ve looked online watched tutorials, have done trial and error, etc. but I can’t seem to get my app working how I want with my new domain. I want users to be redirected to https://lucky-student.com when they enter any of the following variations (see domains on left side of screenshot):
Right now, it only works if I type in my domain beginning with “https: // www” None of the other variations work. When I try to type in any other variation, I just get the error in the browser that says, “This site can’t be reached” with nothing displayed in the browser.
This is what I have set up (see right side of my screenshot):
First of all, I don’t know if this set up is correct. “vast-gooseberry-g65purh1gdxd…” is the DNS Target from Heroku, and is for my domain with www. There is another DNS Target from Heroku too, for my domain without the www. I’m not sure if I should add this here too. At the top of my screenshot, it says, “Add an A, AAAA, or CNAME record for your root domain so that lucky-student will resolve.” I’m not sure what to add. When I try to add something, I don’t know what to input for the IPv4 address.
Another thing that I have set up in Cloudflare is a Page Rule. This is the Page Rule that I added:
Always Use HTTPS
Finally, my SSL/TLS encryption mode is set to “Full”.
I also added my two Cloudflare nameservers in Namecheap, under the Custom DNS setting.
I would appreciate any help or suggestions. I’ve tried so many different things, so now I’m a little confused. Please let me what I did wrong in my settings and what I can do? I may also need to fix my settings in Heroku or Namecheap, but I don’t know. Like I said, it’s my first time attempting to do this, so I don’t know enough. Thank you so much.