Www and non-www issue

I have read some of the other questions similar to mine but this seems so confusing for me to wrap my head around. (*Why is there two versions in the first place comes to my mind)

I receive the following warning from various checker sites:

" No your domain IP 104.28.4.102 does not redirect to springfield-ohio-post.com

To check this for your website, enter your IP address in the browser and see if your site loads with the IP address.
Ideally, the IP should redirect to your website's URL or to a page from your website hosting provider.
If it does not redirect, you should do an htaccess 301 redirect to make sure the IP does not get indexed. "

If cloudflare has my cname set to www and proxied orange
and my A record is set to non-www which proxies to my ip address orange

What should I change in all my webpages (www or non-www)?

Whenever I test my site online there are complaints about the www and non-www directing to different worlds.

I keep getting this error that my www and non-www needs to point somethingorother.

I can change every file to point to either or at the press of a button but my question is:

Which version is cloudflare expecting?

I see the dns section but am confused which to choose (i’ve tried both with mixed results).

Thanks for any suggestions.

Okay that was confusing…!Question: Should I change all pages to be https://www.springfield-ohio-post.com or https://springfield-ohio-post.com

****Digitalocean states that I need to set up two A records one with www and one without both pointing to my ip address which i did (but had to remove the cname first…now I can’t add a cname (is that bad)?

Then Digitalocean directs me to change / add redirect.conf in the conf.d folder
to look like this:

server {
    server_name example.com;
    return 301 $scheme://www.example.com$request_uri;
}

It says when I do a curl it should look like this:

Output:
HTTP/1.1 301 Moved Permanently
Server: nginx/1.4.6 (Ubuntu)
Date: Mon, 04 May 2015 18:20:19 GMT
Content-Type: text/html
Content-Length: 193
Connection: keep-alive
Location: http://example.com/


But when i do a curl, it instead look like this:
curl -I https://www.springfield-ohio-post.com
HTTP/1.1 200 OK
Date: Thu, 05 Dec 2019 17:30:54 GMT
Content-Type: text/html
Connection: keep-alive
Set-Cookie: __cfduid=d17929c0841719a36a96f95adcf97db8e1575567054; expires=Sat, 04-Jan-20 17:30:54 GMT; path=/; domain=.springfield-ohio-post.com; HttpOnly; Secure
Last-Modified: Thu, 05 Dec 2019 16:20:58 GMT
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Referrer-Policy: no-referrer
CF-Cache-Status: DYNAMIC
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Alt-Svc: h3-23=":443"; ma=86400
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 5407c0283a42e3ce-ATL

This topic was automatically closed after 31 days. New replies are no longer allowed.