Www. redirect issue

Hi I am having issues with my http and www. redirects

site name: https://digital-search.netlify.app/
No custom dns I am on the free plan

I am trying to learn the basics with a test site .
I am unable to get the www. to redirect to non www.
I would also like to get http to redirect to https.
I have managed to create a redirects file but it does not work on the http and www. redirections

Here is an example of my _redirects
/test /test1 301!
http://digital-search.netlify.app/* https://digital-search.netlify.app/:splat 301!
https://www.digital-search.netlify.app/* https://digital-search.netlify.app/:splat 301!

Any help would be appreciated, of if you can confirm this is not possible without a custom domain

You’re not using a custom domain, so you don’t have a www subdomain. digital-search.netlify.app is a valid site, www.digital-search.netlify.app is not.

Hi @hrishikesh thanks.

I understand what you are saying and this is why the second line does not work in the _redirects.
However I believe google is attempting to validate the http version of the sitemap via www. checking http://www.digital-search.netlify.app/sitemap.xml where it would get a ssl warning.

Thats the only theory I can think of why google would report a http error 404 in search console.

As I don’t have a custom domain is there anyway I can redirect that scenario?

Thanks

Dan

An invalid theory unfortunately, but rather a super common problem with Google Search Console:

https://support.google.com/webmasters/search?q=sitemap+not+found&from_promoted_search=true