Hi everyone, thanks in advance.
My website is going through cloudflare, and is pointing to an installation of wordpress in this folder.
The client would like a new website, and I’d like to install a new instance of wordpress in this folder:
- Since cloudflare is running, how would I allow my client to view this 2024website instance in the subdirectory before going live?
- When I go live, what do I need to change in Cloudflare to have it point to the new /htdocs/2024website subdirectory?
Without cloudflare, I’d normally be able to see these subdirectory contents. When ready to go live, I’d then be able to just point the domain to the new subdirectory.
Many thanks again in advance
Create a new DNS record for a subdomain, for example
preview.example.com that points to your server and then add the vhost configuration for this subdomain to your webserver.
Nothing, the necessary configuration must be done on your server. Just purge your cache on Cloudflare after you are done.
Holy cow, thanks so much for the quick reply, Laudian. I spent 35 minutes searching google and this community for this answer!
Ok, really sorry about this as I’m just not technical enough… I probably need a walkthrough for how to do these items… such as:
Create a new DNS record for a subdomain
- Is it Type “A”?
- Name would be “preview”
- IPv4 address would be the same 00.000.000.00 number as in the main domain’s settings?
- Proxy status would be “on”
Is that correct?
then add the vhost configuration for this subdomain to your webserver
- I have googled what this means and am not sure how to complete it
the necessary configuration must be done on your server
- Does this mean I have to set up preview.website. com somehow with my hosting provider?
The new record should be the same as for your main website, except with a different name, for example
preview. Otherwise, same type, name and proxy status.
That’s all that Cloudflare does, it sends requests to your server. Which website is then shown is up to your server.
That’s impossible to say without knowing anything about your hosting setup.
If you are using Apache as your webserver, this might help you, especially the “More than one web site per IP address” part: Apache Virtual Host documentation - Apache HTTP Server Version 2.4
Laudian, you are a savoir. Thank you for continuing with support and my apologies for having to learn all of this.
I set up the DNS record as you mentioned. It returns this error: SSL Handshake failed, error code 525.
On the hosting side, I talked to my provided and did all of the steps they mentioned:
Once the A record is updated, assign the subdomain to subdirectory in htdocs by referring the article:
Not sure who to even ask about how to fix this
If your host allows you to upload your own certificate, you can use a Cloudflare Origin Certificate: Origin CA certificates · Cloudflare SSL/TLS docs
I didn’t find anything on their website that would indicate this is possible, you probably need to ask them.
If it is not supported, you can either change your DNS record in Cloudflare to DNS-only and use the site without https (as it is only for a preview), or you need to get a certificate from your host.
Laudian, how do I buy you a coffee. You solved it! New wordpress install is live and I can access it! Amazing. Thank you for all of your help!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.