Website toggles offline/online


#1

Hi,

I am just getting started with CloudFlare since I recently moved my static HTML blog from my VPS to Github Pages. In order to get https working I was informed CloudFlare would take care of the SSL (and other benefits).

However, my website seems to be very unstable. It was online for a while, it went offline again and after pushing a minor update to the blog via Github it seemed to work again. Now I checked it again and unfortunately it is offline again.

Probably I am doing someting wrong, but I have no clue why it is so unstable.

(Domain name is registered with DreamHost, nameservers are updated)

Thanks in advance for any feedback!


#2

If you try to :grey: the record, does it work?


#3

Do you mean I switch the CNAME that converts www to my github.io to DNS only? Or also the two A records that point to Github Pages (192.30.252.153/154)?


#4

Exactly, all the records that go towards GitHub Pages. Note that you will lose HTTPS for the time being.


#5

Trying that now. Both www and root are working via http://.


#6

I see one issue with your DNS config. You should change the www CNAME to point to your root.

In this case HTTPS wouldn’t work because it requires a valid certificare for *.jitsejan.com on the jitsejan.github.io which is not present.

Once you have changed the CNAME record you can enable the proxying again (:orange:) and switch on the HTTPS (Flexible option) in the Dashboard.

EDIT: this assumes you have your custom domain on GitHub set as the root.


You can follow this guide as well, this doesn’t require you to have a custom domain setup on Github.


#7

That is the guide I followed, but in Step 2 both www and ju.je are added pointing to github.io. When I try to do the same, I receive an error:

An A, AAAA or CNAME record already exists with that host. (Code: 81053)

By the way, I am using www.jitsejan.com on Github.io. Is it better to make it jitsejan.com?


#8

You have to delete the current A records (if you follow that guide) and then add the CNAME.

You cannot have an A/AAAA and a CNAME on the same host.

It doesn’t matter much, but the host you have in there (not necessary to even have one if you use the double CNAME that is the guide) must be the one with the A records, the other must have the CNAME (to your own domain, not to *.github.io because it can cause issues if they refuse a non-registered host).


#9

Okay, I only have two CNAME records as shown in the image. However, the behaviour is strange. In Google Chrome I can access both http://www.jitsejan.com and https://www.jitsejan.com. http://jitsejan.com and https://jitsejan.com do not work. In Firefox and IE I am not able to access any of the 4 URLs.

I also tried to clear the cache in the three browsers without any result.


#10

They do in fact work, for me all 4 work (they all get redirected to https://www.jitsejan.com/ though, as I believe is what you want).

Try clearing your DNS cache (ipconfig /flushdns). Also what error do Firefox and IE give you?


#11

That is indeed what I want. I get the error that the page can’t be reached. Right now I have an issue in all browers with all URL varieties…


#12

Additionally you could want to create a Page Rule redirecting all traffic from https://jitsejan.com/* to https://www.jistejan.com/$1 so that you reduce the number of redirects to a minimum.


#13

Windows right? Try doing

nslookup www.jitsejan.com
nslookup jitsejan.com

nslookup www.jitsejan.com 1.1.1.1
nslookup jitsejan.com 1.1.1.1

#14

This is the result:

 C:\Users\j.waterschoot>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

C:\Users\j.waterschoot>nslookup www.jitsejan.com
Server:  company-url.com
Address:  172.X.X.X

Name:    www.jitsejan.com


C:\Users\j.waterschoot>nslookup jitsejan.com
Server:  company-url.com
Address:  172.X.X.X

Name:    jitsejan.com
Addresses:  2400:cb00:2048:1::6818:7aeb
          2400:cb00:2048:1::6818:7beb


C:\Users\j.waterschoot>nslookup www.jitsejan.com 1.1.1.1
Server:  1dot1dot1dot1.cloudflare-dns.com
Address:  1.1.1.1

Non-authoritative answer:
Name:    www.jitsejan.com
Addresses:  2400:cb00:2048:1::6818:7aeb
          2400:cb00:2048:1::6818:7beb
          104.24.122.235
          104.24.123.235


C:\Users\j.waterschoot>nslookup jitsejan.com 1.1.1.1
Server:  1dot1dot1dot1.cloudflare-dns.com
Address:  1.1.1.1

Non-authoritative answer:
Name:    jitsejan.com
Addresses:  2400:cb00:2048:1::6818:7aeb
          2400:cb00:2048:1::6818:7beb
          104.24.122.235
          104.24.123.235

#15

And the following when I try from my VPS:

[email protected]:~/code/jitsejan.github.io-source$ dig jitsejan.com +nostats +nocomments +nocmd

; <<>> DiG 9.10.3-P4-Ubuntu <<>> jitsejan.com +nostats +nocomments +nocmd
;; global options: +cmd
;jitsejan.com.                  IN      A
jitsejan.com.           291     IN      A       104.24.122.235
jitsejan.com.           291     IN      A       104.24.123.235
[email protected]:~/code/jitsejan.github.io-source$ dig www.jitsejan.com +nostats +nocomments +nocmd

; <<>> DiG 9.10.3-P4-Ubuntu <<>> www.jitsejan.com +nostats +nocomments +nocmd
;; global options: +cmd
;www.jitsejan.com.              IN      A
www.jitsejan.com.       299     IN      A       104.24.122.235
www.jitsejan.com.       299     IN      A       104.24.123.235

#16

It seems like your company’s DNS fails to resolve the domain. If you can, try switching to Google’s or Cloudflare’s and retry. It should solve you issues.

As for Firefox and IE, Are those the latest version? Do you run Windows 10?


#17

I enabled the forwarding rule. That seems to work fine.

It feels like my work network redirects parts of my traffic and that is why it fails? I have tried on my phone now, company traffic blocks the 4 URLs while on 4G I can open all four


#18

Exactly what I was saw and replied at the same time! You should contact you DNS/IT admin.


#19

Haha, I pressed Enter and I saw your answer too :slight_smile:

I am indeed running Windows 10 and all browsers are up to date. I think it simply boils down to the fact that the DNS within the company cannot resolve the address.

Overall you believe that the configuration is correct right?


#20

I believe it is. You can actually disconnect the domain from the GitHub page, as this should work without problems. Do confirm it (and in case correct me).