how do I make my domain name show up and not my ip address?

Posted April 25, 2020 433 views
Configuration Management

I followed the instructions. I set up my domain name in namescheap, I pointed the nameservers to n2,n3 …
I came back to digital oceans, I clicked on add new website and I even added the domain name to the A record.
So the domain does point towards the server but then it redirects to the ip address afterwards.
I would like the domain name to stay whenever I type it in.
What am I doing wrong?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hello, @blankmail89

Could you please share more information about the server/droplet configuration itself - OS, web server (Apache, Nginx) ? You can basically share what’s the current droplet build (if you’re using docker and etc)

You can also share your current virtual host configuration for the domain name as well or share any .htaccess rules if you’re using Apache.


Okay, I’m using ubuntu, apache and mediawiki.
My apache configuration in /etc/apache/sites-enabled/000-default.conf is
<VirtualHost *:80>
ServerAdmin webmaster@localhost

     DocumentRoot /var/www/html/
    <Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted


And I tried making an htaccess file on the /var/www/html folder but it didn’t work.