Now that we have our name servers pointing to Digital Ocean we need to configure our DNS zone file so
that our domain points to the correct server to do so.
If you haven't already go back to the Digital Ocean admin panel and you're going to click on the networking
link
under the heading AD domain you're going to type in the first domain name you'd like to host on your
droplet makeshift from the menu over here.
You select the server you just created
and then click Dumi.
All we need to do now is add to a records that point to the IP address of our server one record will
be for our domain name without the w w w prefix.
The second will include the w w w prefix.
So just go ahead and make sure you have a selected here.
So typing in an at sign here
and on the right side here.
You're going to select the floating IP we created
and hit create record.
Now we're going to create another a record.
So Type in W W W select the floating IP again.
And create record
now a separate DNS record is required for both domains.
We finished this first domain.
So let's go ahead and do this second domain the same way.
So go back to networking
type in the second domain.
Select the server we just create it from the menu and hit domain.
Create your first a record tip in the at sign again select the floating IP and create record
now create the w w w record it will direct to the floating IP and create a record
perfect.
So now we have our two DNS zone files created for each of our domains.
So with our name servers and DNS records now configured we can test to make sure that everything is
working.
Keep in mind that anytime you make changes to name servers it can take up to 48 hours for them to propagate.
So if it doesn't work right away don't be alarmed.
Just wait a day or so and try try again.
You know if it doesn't work from that point forward then you know that there's probably some issue going
on in your configuration somewhere
OK so I'm going to go ahead and test the first domain name
so you can see that it says this site can't be reached.
That means that the changes have not propagated in the DNS system yet.
There is a way to bypass this just to make sure that it is in fact working.
And I'll show you that in just a second.
But before I do that let me test the second domain
and this time you can see that this domain is working correctly.
So the second one is working.
If you remember we created this DML page and placed it into the HDMI folder of our second domain.
And so this one is working.
The first one is still propagating.
One way to bypass the DNS from propagating is to try to access your website through a proxy that has
likely never visited your website before.
I have been to the first domain earlier this week so that page or the IP associated with that page is
likely still cached with my internet service provider or some local DNS service somewhere in my area.
So what I'm going to do is I'm going to go to a free proxy service.
If you just go to Google dot com and type in free web proxy
and let's go ahead and enter the domain through this proxy
because nobody from the Netherlands is likely visited this domain name it's not going to pull up a cached
IP address.
It's going to try to resolve the IP address using the new information the new name servers that we can
that we configured with our domain name registrar.
So hopefully this isn't too confusing for you.
A simpler solution is to just wait a day or so and it'll start working for you.
But if you want to you know sometimes you don't have that luxury of waiting.
Or you can just test it on a proxy.
And as long as it works on the proxy then you know for sure within a matter of hours it's going to start
working in your area and just about everywhere where DNS systems are constantly rebuilding their the
IP addresses attached to each domain.
OK so you can see that through the proxy it did pull up the right page.
So that means it connected to the correct IP address based on the name servers we'd set up with our
domain registrar.
So that means our web server is now pulling up separate pages in separate directories for each domain
name that we're hosting on this server.
And so we've accomplished the first part of what we set out to do in the next lesson.
We're gonna be installing separate SSL certificates for each of these domains.