I'm not sure if that is the best/correct way to do it.
What you should have probably done is use the server_name
property to point to your Apex/Main domain.
I highly recommend that you to go through the documentation throughly atleast once, especially if you will be hosting the server for a long period of time.
Edit:
If you followed the cloudfare guide you linked below, it should probably be fine. Still do go through the documentation.
I will tell you there is no need to be worried about coding. You don't have to be worried about not knowing how to code. The coding part of coding is the simplest and the easiest part, the much much more important part is the thinking part, basically what you want to achieve and how you should go about it.
A lot of so called professional "coders" don't know what it is that they are doing. A few days ago i looked at my sister's very impressive code. That was truly a hard day, the ways in which I controlled myself by not beating the shit out of her for being a piece of garbage who is incapable of thinking. She would not understand even when explained in simple words why her code was incredibly shit and what to do to fix it, finally she didn't fix it and left ruining more than just my day, she sent me into a trance worrying about the future of mankind as a whole, which I have still not been able to come out of.
Also as far as coding is concerned I would suggest you get started with python. It is easy and simple. Learn the basics in python, for majority of the things you will have achieved your desire.
I suggest that you use the book
automate the boring stuff
as a starting point, it will not only help you with your desire for coding, but may also come out to help you in your day-to-day things as well. You can easily find the pdf for free.https://automatetheboringstuff.com/