Django - Remove HTTPS redirect - django

I've a django app hosted on pythonanywhere servers.
Some days ago, while editing this website, I've added in the settings.py file some variables about the https and ssl connection.
Obviously I didn't want the https while I don't have the certificate, but I forgot those variable in the settings file.
After the upload of files, going on the site, I saw that I've forgot those variables.
I've immediatly deleted the variables from the settings file and re uploaded, but the problem persists.
I mean, if I go to the site there is a redirect to https that I don't want.
The outcome is "Connection is not private" whit a red barred https.
Could you please tell me how to fix this problem? how to remove the automatic redirect to https and aboid the message "connection is not private" ?
Thank you in advance!!!
edit:
I know that if I go to http://siteaddress everything is ok. but if in the address bar you put just www.siteaddres.com it's automatically redirect to https://www.siteaddress.com

It was a caching problem.
I'm using google chrome and when you go to Clear browsing data you have to set all and not just the last hour or what it's set

Related

Wagtail internal link urls arent working properly

in my rich body text fields, when an internal page is used for a link, the url that gets attached to the a tag is "https//example.com/example", ie it's missing the colon and the link doesnt work. I get the error "https's server ip address could not be found".
any idea why it is doing this? thanks
Check the site record under Sites -> Settings. The hostname field should NOT contain https - i.e. it should be example.com, not https://example.com.
in case anyone else has this issue, it seems having more than one site in wagtail caused this. I had the default localhost site still on there, even after switching to a new production site configuration. deleting the localhost site fixed this.

Getting url errors after deployment

Hello I have a django project with the domain www.itucampus.com, I owned the domain from godaddy and forwarded itucampus.com to www.itucampus.com I hosted it on pythonanywhere.com. I also forced http to https. My problem now is sometimes I could reach my webpage and sometimes not and now I found which urls are working and which not.
itucampus.com www.itucampus.com https://www.itucampus.com are working
but
https://itucampus.com http://itucampus.com http://www.itucampus.com are not working and I am getting the error to many redirects.
Could you please help me
GoDaddy doesn't support HTTPS-based redirects, so if you want https://itucampus.com to work, you'll need to use a different service for your redirects. NakedSSL is a free one that should work well.

Make google crawl a site when it is cloaked

I host this website. And I order a domain for it. SO the site is hosten on somedomain.be/boring
I added a domain www.company.com
Now In the webmastertools of google if I want to add the property they wil not verify it despite the DNS record, TXT, TAG, and file.
How Can I fix this?
I changed the config to HTTP redirect. That way it can be crawled but then I changed it back to cloaking again.

website be opened with redirection from stranger domaine

my problem is:
I own a website developed with django framework and uploaded in heroku.
my domain is "OnlyMyDomain.com", but "StrangeDomaine.com" calls my website with a redirect. in other words when you go to StrangeDomaine.com, my website is opened even if the address change to OnlyMyDomain.com.
I tried in my settings.py:
DEBUG = False
ALLOWED_HOSTS = ['OnlyMyDomain.com']
Please can someone explain to me where the problem is coming from? and how can I avoid it?
There is no problem. It seems that you define a permanent redirection (301) from StrangeDomain.com to OnlyMyDomain.com. Then request url will be updated, then StrangeDomain.com becomes OnlyMyDomain.com. If you want to avoid that, just remove this redirection.
The HTTP response status code 301 Moved Permanently is used for
permanent URL redirection, meaning current links or records using the
URL that the response is received for should be updated. The new URL
should be provided in the Location field included with the response.
Wiki : HTTP 301

Django forms redirecting to internal IP on Amazon AWS

I have two sites that share the same problem, they are both hosted on Amazon EC2.
The machines are Debian 6.0, with an nginx server in front serving media, and proxying to apache+mod_wsgi to serve django.
Normal navigation on the site works fine, but whenever I click on a link without a trailing slash, or I submit a form, instead of redirecting me to www.domain.com/path/to/page/ I will be shown ip-11-111-11-111/path/to/page/, with ip-11-111-11-111 being my AWS internal IP address. The forms/links are working as the python code is executed, but when the templates are called, the url is 'built' wrong. Setting APPEND_SLASH = True doesn't fix it, and the same behaviour happens with the admin site, so I suspect it is some general issue rather than a bug in my code.
Has anybody encountered this problem? Any suggestions on how to solve it?
I've been googling this for weeks now and still can't figure it out, any ideas on where I should be looking would be appreciated as well.
In case anybody else has the same problem, the issue was apache redirecting non-www sites to the address it was listening on, which was the internal ip. I fixed it by forcing www. in nginx so that apache will never need to redirect.