How to view my Linode's site without DNS

Linode Staff

Is it possible to view my Linode's website even if a domain isn't pointing to my Linode anymore?

3 Replies

Short answer: Yes! This is possible.

The best way to achieve this is to make some small adjustments to your Apache configuration and then use your Linode's IP address in your browser's navigation bar instead of the domain name.

It sounds like your Apache is currently configured to work with the domain name that is now pointing somewhere else. You'll need to reconfigure it now to work with the IP address assigned to your Linode. To do this, you'll have to set up your site's virtual host block in your 000-default.conf file, enable that file, and then restart Apache.

Here's an example of what your site's virtual host block may look like via this helpful Stack Overflow post:

<VirtualHost *:80>
        ServerAdmin [email protected]
        ServerAlias <IP address>
        DocumentRoot /somewhere/public_html
        <Directory /somewhere/public_html/>
         Options Indexes FollowSymLinks MultiViews ExecCGI
         AllowOverride Authconfig FileInfo
         Require all granted
        </Directory>
</VirtualHost>

This is what you'll want to set up (depending on your site's virtual host configuration of course) to be present in your 000-default.conf file.

Once that is set up, you'll want to enable the 000-default.conf file (replace /path/to/file with your file path):

sudo a2ensite /path/to/file/000-default.conf

And then restart Apache:

sudo systemctl restart apache2

This should allow you to then type your Linode's IP address into your browser and then view your site's content!

Here are some super useful examples of virtual host configurations straight from Apache:

VirtualHost Examples

And here's a link to our Apache guides:

Hosting Websites with Apache

Hope this helps!

Or just use the hosts file of your operating system to override the DNS.

+10 for @Woet's answer. This is the easiest way by far.

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct