Forward all subdomain URLS to specific URL on primary domain

May 28, 2018 99 views
DNS System Tools Ubuntu 16.04

Here are my Droplet/server details:

Ubuntu 16.04.3 x64 / 8 GB Memory / 160 GB Disk

My issue:

I am currently trying to forward all URLs of my subdomain to a specific URL on my primary domain.

Example:* needs to be forwarded to

NOTE: I need to forward both AND all the URLs on (,, etc) to

All URLs being forwarded will go to ONE (aka the same) URL on the primary domain. I also need to forward the subdomain "homepage" to the same page as well.

I am reorganizing my website layout structure and I am removing my subdomain sites and replacing them with specific pages on my primary domain.

I checked with Cloudflare (using to manage DNS) and it looks like you can do this with page rules but they want to charge $1 a month per page rule which seems a bit ridiculous. I'm hoping there is some way to do this within the DigitalOcean interface (possibly with .htcaccess?).

Consider me a noob when it comes to this type of stuff as I'm still learning my way around.

Thanks in advance!

Be the first one to answer this question.