Using aws load balancer CNAME on godaddy - dns

My website is on EC2 server and it's being server by AWS Loadbalancer.
As loadbalancer only provides the CNAME record, I have pointed out the CNAME record to 'www' of my loadbalancer dns. Also, I have configured a domain forwarding and forwarded to 'www'.
Now, when I check URL on the browser:
http://example.com ==> works perfectly (forwards to https://www.example.com)
http://www.example.com ==> works perfectly (forwards to https://www.example.com)
https://www.example.com ==> works
https://example.com ==> Error, Your connection is not private. NET::ERR_CERT_COMMON_NAME_INVALID
In the 4th case, when I go to advanced and proceed, then it works perfectly again (forwards to https://www.example.com).
when I search my website on google, it indexes https://example.com and our clients are facing the issue loading the site. How can I resolve this issue?

Related

Setting up a subdomain to use both www and non-www

I have www.mydomain.com and mydomain.com both working. Now, the subdomain sub.mydomain.com also works well; but not www.sub.mydomain.com.
I've tried adding A records for for www.app; but not working.
I've also tried creating a CNAME record "www.app" for mydomain.com; but also not working.
Browser throws a NET::ERR_CERT_COMMON_NAME_INVALID for both.
Any suggestions?

Adding Fastly to a Heroku app does not forward to proper url

I currently have an Heroku app that is being served over a CDN. I have just added Fastly to my Heroku app as an addon and I am struggling to configure it properly. Here is my current configuration:
I have my domain registered on GoDaddy with the following CNAME configuration:
Host: www
Points to: my-site-herokuapp-com.global.ssl.fastly.net
TTL: Custom
Seconds: 600
Here is the GoDaddy forwarding configuration (not sure if this matters):
Forward to https://www.my-site.io/
(301 & forward only)
Here is my fastly configuration:
Domains:
my-site-herokuapp-com.global.ssl.fastly.net
*Provisioned for my-site via Heroku*
my-site.herokuapp.com
*Provisioned for my-site via Heroku*
www.my-site.io
And finally in Heroku in the domains configuration section of my app here are my settings:
Domain Name: my-site.io
DNS target: darwinian-kumquat-123456.herokudns.com
Domain Name: www.my-site.io
DNS target: serene-trout-123456.herokudns.com
Before I tried to make this change I had the CNAME pointing directly to: serene-trout-123456.herokudns.com an it was working fine. However after updating this value to the new Fastly value: my-site-herokuapp-com.global.ssl.fastly.net Fastly directs the site to my-site.herokuapp.com instead of just https://www.my-site.io. I followed the instructions listed here so not entirely sure where I have gone wrong. Any ideas?
Probably because you used redirect 301 and you are using the same browser as before before cleaning cache and data.
301 redirects are recomended only for very limited cases: once done the browsers will NOT refresh again any data from the original server.
There are plenty of posts regarding redirection 301, for example:
Cannot remove 301 redirect
htaccess 301 redirect - how to disable it?
https://www.exai.com/blog/301-redirects

How to redirect www to non-www on GoDaddy when using Firebase hosting

I am unable to redirect www.mydomain.com to mydomain.com. I have tried adding an A record with subdomain www and IP address from firebase, but that doesn't work. Any suggestions?
You need to setup forwarding of your subdomain (www) as follows:
Goto GoDaddy's Manage DNS page and scroll down to forwarding, here is the configuration to set:

Different ways to do a redirect

I'm working on an old website and I've just found something strange. Www.mysite.com redirects to www.test.com, while mysite.com (non-www) redirects to www.other-site.com.
I've checked the htacces, and it only contains rules to redirect traffic to test.com. www.other-site.com is not present in the file. So how is it possible? Where should I check if there's a rule for this redirect?
Environment:
Centos server /
Apache /
Three sites are on different servers
This could be a DNS issue. If both www.test.com and test.com point to the same server then it is all server side. Virtual hosts can sometimes be the problem if you have Apache set that way then you will need a Virtual host for both www.test.com and test.com. I would say start with the DNS, then the apache config, then the site folder.
Hope that helps.

AppHarbor points my domain to www.hostname.com but not hostname.com

I'm interested in having my website show up for both of these urls - www.example.com and example.com. DNS works properly and redirects www.example.com to 184.72.232.XXX and shows the website but not example.com. I've tried 2 hostname setups:
www.example.com, canonical=true
*.example.com (unable to set canonical)
Both hostname configurations have the same result.
You'll need to add "example.com" too (and keep "*.example.com"). The wildcard only matches subdomains. If you want the www version to be the canonical hostname, you'll need to add that as well.

Resources