Forums

http://abc.com/ads.txt and https://abc.com/ads.txt not working

Recently realized that my website was not accessible at http://abc.com and https://abc.com (without www) so I updated godaddy domain forwarding to http://www.abc.com Now I can access those two urls without using www which I was having issue with earlier.


Now I am trying to figure out why http://abc.com/ads.txt and https://abc.com/ads.txt isn't working (without www) Below is my urls. py path('ads.txt/', TemplateView.as_view(template_name='stats/ads.txt'), name='ads'),

I am using django default settings. Is there something I need to change in Django to make it work?

Just to clarify the url https://www.abc.com/ads.txt and http://www.abc.com/ads.txt is working (with www)

Take a look at https://help.pythonanywhere.com/pages/NakedDomains/

I have already fixed the non-www link redirect to www redirect using godaddy forwarding so all these urls work: http://abc.com https://abc.com http://www.abc.com https://www.abc.com http://www.abc.com/ads.txt https://www.abc.com/ads.txt

But these are not working: http://abc.com/ads.txt https://abc.com/ads.txt

How they are not working? (You may need to check if GoDaddy supports HTTPS forwarding, as it's not supported by all DNS providers for naked domains.)