I am testing our new site on https, and find that certain pages occasionally show as 404 not found.
It only happens for some pages, and sometimes I get the correct page and sometimes I get the 404 page.
If I disable https the pages all work again, but we want production to be using https.
Enabling Failed request logging in IIS I get the following:
I did not set umbracoUseSSL to true, as I understand this is for
backoffice and not required for the public website, but I will test
if it makes a difference.
Yes I have IIS rewrite rules to ensure all
requests go to https
Generally all urls within the site are setup as relative urls, so no
direct links to http content.
My main problem was that the site is working in https, but for certain pages including the search results page and the checkout page, I would sometimes get served the correct page and other times be served a 404.
switching to http seems to solve the issue, but I need to investigate further why I was getting the 404 message.
How Can I debug or diagnose the cause the a 404 page in umbraco, when the URL should be valid.
We were expliciting saving the url scheme (http or https) in the GetUrl response, based on the first request to the site being (http or https)
The 404 errors occur for https requests if the first request to the site was http, then our URL map was all http links, and future https requests will fail to match any url.
Some https urls did appear to work at the time, but that was due to persistent page caching.
likewise if the first request to the site was https, future http requests would fail.
removing the scheme from the url in our IURLProvider and IContentFinder code solved the problem.
404 errors on some pages using https
I am testing our new site on https, and find that certain pages occasionally show as 404 not found. It only happens for some pages, and sometimes I get the correct page and sometimes I get the 404 page. If I disable https the pages all work again, but we want production to be using https.
Enabling Failed request logging in IIS I get the following:
MODULESETRESPONSEERRORSTATUS
any idea on how to investigate this issue further, or suggestions on possible cause, as I am a bit stuck
Hi andrew,
Can you confirm the following steps for enabling https for your production website:
Enable https in the
web.config
by changing the keyumbracoUseSSL
to trueMake sure you setup your IIS url rewrite rules so that everything points to the https version
Check your website content where you have urls defined so that they point to the https version of the url
Hope this helps!
If you have any questions, let me know!
/Michaël
Thanks for the reply
My main problem was that the site is working in https, but for certain pages including the search results page and the checkout page, I would sometimes get served the correct page and other times be served a 404. switching to http seems to solve the issue, but I need to investigate further why I was getting the 404 message.
How Can I debug or diagnose the cause the a 404 page in umbraco, when the URL should be valid.
Just to close this question. The problem was to do with a custom URLProvider, we implemented to handle multilingual 1-1 website, inspired by Jeroen Breuer post and example on github http://24days.in/umbraco-cms/2015/multilingual-vorto-nested-content/
We were expliciting saving the url scheme (http or https) in the GetUrl response, based on the first request to the site being (http or https)
The 404 errors occur for https requests if the first request to the site was http, then our URL map was all http links, and future https requests will fail to match any url. Some https urls did appear to work at the time, but that was due to persistent page caching. likewise if the first request to the site was https, future http requests would fail.
removing the scheme from the url in our IURLProvider and IContentFinder code solved the problem.
is working on a reply...