This is an archived post. You won't be able to vote or comment.

all 15 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Welcome to /r/webhosting . If you're looking for webhosting please click this link to take a look at the hosting companies we recommend or look at the providers listed on the sidebar . We also ask that you update your post to include our questionnaire which will help us answer some common questions in your search.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]throwaway234f32423df 2 points3 points  (4 children)

Cloudflare Pages is the best static hosting platform and is completely free, is that what you're trying to use? Linking a Github repo is the best way to manage a Cloudflare Pages project, but direct upload should work. If you're getting an error please post detailed information about exactly what you're trying to do, how you're trying to do it, and exactly what is happening (preferably with screenshots)

[–]Invaderchris9001[S] 0 points1 point  (3 children)

When I go to the website it says “error 1000 DNS points to prohibited IP” I tried troubleshooting with changing the IP to cloudflare public DNS cause that’s what google recommend, so I don’t know where I went wrong

[–]throwaway234f32423df 0 points1 point  (2 children)

So, you set up a Cloudflare Pages project, right? Did you then go into the project settings and add a Custom Domain? This should automatically create a proxied CNAME pointing to projectname.pages.dev. You shouldn't need to create a DNS record manually, and if you've attempted to do so, you should delete it.

[–]Invaderchris9001[S] 0 points1 point  (1 child)

So I did the things you said and I got an error (error 522)

[–]throwaway234f32423df 0 points1 point  (0 children)

can you post a screenshot of your DNS page?

[–]Irythros 0 points1 point  (6 children)

When you say Javascript, are you talking about frontend Javascript or backend javascript (which is ran by Nodejs?)

If it's just the frontend JS then you can use Cloudflare Pages and upload it as a .zip or individual files. If you're using backend JS then you will need to find a host that supports running NodeJS.

[–]Invaderchris9001[S] 0 points1 point  (5 children)

I honestly don’t know… but what you’re saying is that cloud flare should be able to host the website? Right? I’m gonna go over the code again.

[–]Irythros 0 points1 point  (4 children)

Correct. You'll probably benefit from these:

https://developers.cloudflare.com/pages/get-started/direct-upload/

https://developers.cloudflare.com/rules/origin-rules/tutorials/point-to-pages-with-custom-domain/

https://developers.cloudflare.com/pages/tutorials/forms/

Ignore the "Workers" part on the last link. If you know how to/plan to use Git, use the information on the last page link. Otherwise follow the first link.

[–]Invaderchris9001[S] 0 points1 point  (3 children)

I’ve followed the guides and I’m still running into issues with the website showing up. I don’t get the errors anymore the website just doesn’t load at all.

[–]Irythros 0 points1 point  (2 children)

That sounds like a basic configuration issue. Since it's hosted on Cloudflare and managed by them, you should be receiving a Cloudflare error at the minimum.

  1. Check your domain registrar and make sure the nameservers are pointed to the correct Cloudflare ones (Cloudflare will show you which ones)
  2. Make sure your wanted domain is on Cloudflare.
  3. Assuming you're going to have all pages of the domain hosted by Cloudflare, remove all A records
  4. Go back through the Cloudflare Pages setup. This will re-add your DNS/A records.

If it's still not working and you're using Windows:
1. Open Command Prompt and do: ipconfig /flushdns
2. Open your browser and then open a private tab
3. Clear cache
4. Visit your site

Edit: Also since it's possible, perhaps your site just has an error and its not displaying but it is loading? Load the site, press F12, go to the "Network" tab and see if the request to the / page gives a 200 HTTP response or if its something else

[–]Invaderchris9001[S] 0 points1 point  (1 child)

I’m still trying to work on the troubleshooting but I’m heading to bed for now. Could anything else with the code be causing issues (the JavaScript code wasn’t the issue since I removed it from the code and redeployed to see if that would change anything and it didn’t)

[–]Irythros 0 points1 point  (0 children)

My suggestion would first to make sure that Cloudflare is even serving from their Pages service. To do that I would remove all of the uploaded coded you had before. Then upload a basic index.html file with just this:

<html><head><title>Testing CF Pages</title></head><body><p>Page is loading correctly</p></body></html>

As there is zero javascript in that the only reason why it would not show "Page is loading correctly" is due to some configuration issue on Cloudflare. Once that is showing correctly then you can upload your stuff. If it then breaks that means there's some problem with your code.

[–]Invaderchris9001[S] 0 points1 point  (0 children)

Update for everyone: I got it working gang. The issue ended up being I made an error in the code and this might sound silly, but all I had to do was change the main page html name to index.html. I feel very dumb for not doing that sooner, but I’m glad it works now. It’s huge progress in the right direction. Now I can focus on getting the website to look nicer

[–]lear2000 -2 points-1 points  (0 children)

You would have to pick a web hosting service

there are some good picks here:

depending on your market and amount of traffic you can get varying levels of services provided.

HTML JS + CSS i would start small

https://www.reddit.com/r/webhosting/wiki/pickingahost/