How To Configure Your Linux Web Server To Serve Non-WordPress Dot-Bit Web Sites Properly

By Frank Bieser, Big Head / BigHeadPress.bit

Now that you have your .bit domain registered and updated with your web sites IP address, you need to reconfigure and re-start your web service, so it will recognize the new .bit name.

If you’re on WordPress, that can be done from the WordPress install. We have code and directions for doing that here.

For non-WordPress sites, below is the info from the Web server end to make things link and work perfectly:

These steps should work for any flavor of GNU/Linux running one of the Apache web server variants.  If it supports name-based virtual-hosting, the VirtualHost, serverName, and ServerAlias items will be there (and they are the only ones we care about). If you are running a website on AWS, good chances you are running it on an Ubuntu GNU/Linux instance with apache2, which is what I will use in my examples….

Start by editing the web service config file you modified when you set your site up initially with your favorite linux editor.  Let’s assume your site was

$ vi /etc/apache2/sites-enabled/000-default

In there you probably have a stanza that looks like…

<VirtualHost *:80>
ServerAlias *
DocumentRoot /var/www/mydomain

Copy the lines of that stanza, and make a new stanza, changing all cases of to mydomain.bit.  It should look like …

<VirtualHost *:80>
ServerName www.mydomain.bit
ServerAlias *.mydomain.bit
DocumentRoot /var/www/mydomain

Save your changes and restart the web service.

$ sudo service apache2 restart

(The one problem you may run into; if your website uses absolute references when linking to local things, like images and other files.  Those linking to your DNS-based domain (, won’t work if DNS resolution fails.  By making them all relative, the web server will do the work for you.)

This will serve your Dot-Bit sites up with all links and images showing the .bit links, which would keep you drone-proof if your .com domain name were seized. And this workaround does not affect the serving of your Dot-Com site from the same files.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.