How to add a subdomain on a different droplet/server?

July 26, 2019 277 views

I have 2 servers on which one have wordpress site on root domain “” and i want to open a discourse forum on other server on my subdomain “”. And my root domain is using cloudlflare.

So when i tried to add a dns of forum and pointed it to the new server, it still shows nothing. I dont know why , i know this is somewhat off topic. But please i am trying to figure this out from couple of weeks.

When i visit the, it shows me the cloudflare page but says the host in not working. I also added the subdomain in my digitalocean panel still nothing

Please help!!

1 Answer


Can you confirm if you’ve followed these steps here in:

  1. Login to Cloudflare
  2. Use the drop-down menu in the upper left of your screen and click your domain that you want to install the subdomain on.
  3. Click the DNS icon at the top of the screen.
  4. Select A using the drop-down options
  5. Add the subdomain in NAME
  6. Add the IP address of your droplet in the box labeled IPv4 Address.

If you’ve followed those steps note that it might take a while for the DNS cache to clear over the Globe.

Hope that this helps!

  • Yes, i’ve followed all the steps, and even added it in my digitalocean account in the root domain

    However, i’ve waited for 1 hr and it still shows the cloudflare screen

    Error 521 Ray ID: 4fc6ec4fxxxxxx • 2019-07-26 14:04:30 UTC
    Web server is down

  • I tried to visit the subdomain now… and this is what i got -

    Retry for live version :

    This page ( is currently offline. However, because the site uses Cloudflare’s Always Online™ technology you can continue to surf a snapshot of the site. We will keep checking in the background and, as soon as the site comes back, you will automatically be served the live version. Always Online™ is powered by Cloudflare | Hide this Alert

    • Sometimes it could take from 1 to 72 hours for the DNS cache to clear over the Globe. Can you try in a few hours and let me know how it goes?

      Also just make sure that the A record for your subdomain name is pointing correctly to the droplet’s IP address.


      • Disable Cloudflare (orange cloud), then DNS will appear quicker!

      • Thankyou man, you the best!!
        I had to wait for 15 hours to get it working!!

        • No problem at all! I’m happy to hear that it is all working now!


          • Hi @Cybil

            I can see that someone already replied to your question. Happy to see that you’ve got it sorted!


          • I’ve got one more issue, can you please guide me through this

            So I tried htaccess to nginx conf converter.

            This is htaccess code

            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteCond %{REQUEST_FILENAME}.php -f
            RewriteRule ^(.*)$ $1.php
            RewriteRule ^([a-zA-Z0-9\-\_]+)$ index.php?profile=$1 [NC]
            # Return 404 if original request is .php
            RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
            RewriteRule .* - [L,R=404]
            ErrorDocument 404 http://localhost/folder/404

            Nginx conf code

            # nginx configuration
            error_page 404 http://localhost/folder/404;
            location / {
              if (!-e $request_filename){
                rewrite ^(.*)$ /$1.php;
              rewrite ^/([a-zA-Z0-9\-\_]+)$ /index.php?profile=$1;

            Everything seems to work fine but this line doesn’t works

            rewrite ^/([a-zA-Z0-9\-\_]+)$ /index.php?profile=$1;

            It is for clean url, but it always shows 404 for that.Please help me out with this

          • Hi @Cybil

            The rewrite rule looks correct, what is the CMS that you are using? Maybe you need to add some extra rules.


          • Hey @bobbyiliev
            Im using NO CMS, its a php site, so do you have any idea what rules should I apply?

          • Hi @Cybil

            This would really depend on your PHP code then. For example, I thin that waht the current rewrite rule that you have does is it forwards any request that comes in, to index.php?profile=.

            For example if you visit, this would be forwarded to


          • I would recommend also to take a look at this tool here that would help you generate the correct Nginx config for your exact needs:


Have another answer? Share your knowledge.