How to move staging site

I have a main site which is , the IP is, for example,
And I have a staging site which is, the IP is

If I go to click [add site], I can only type a domain under in this format. But my main site and staging site have the same domain, How can I move or say implement my staging site on to cloudflare?

You can do this in DNS. Just change the IP address for the main site to be 21.

But your .21 server also needs an updated server conf file so it knows it’s the main site.

Thanks for the answer.
But I dont really understand. If I set main site to 21, so all the traffic to main site would be redirected to staging site sitting on 21 right?

Could you please clarify the procedure? That would be much helpful.

You can’t. Cloudflare only accepts standard domain names; you can’t add a subdomain to Cloudflare. If you need to test Cloudflare on a staging site, you’ll need get a separate domain for that site, rather than using a subdomain.

Thanks for the answer.
But can I add an A record like this

Ah, now I understand. That “A” record only needs to have ‘staging’ for the Name, and Cloudflare will automatically add the domain name.

1 Like

Yes, after adding it and clicking save, it looks like this

will this work, if I visit

1 Like

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