Keeping wordpress from redirecting to domain from ip

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.6
Virtualmin version 7.8.2

Hello, Please help the newbie out, I tried to search the topic but couldn’t find answer.
I’m not a native english speaker, but try to explain myself:
I installed Virtualmin onto my new VPS, started a virtual server and installed wordpress.
Since I started this server due to research reasons, I need to reach my wordpress site using the IP address and not the domain. The domain is currently in use with another server provider and I would like to bulid and move the site before redirecting the NS to this new VPS server.

During the install I had to insert the domain name to the virtualmin and because of that when I try to reach my wordpress site: IP/wp-admin the server redirects me to the actual domain instead of keeping me in my server with the IP.

How sould I solve this matter?

Thank you in advance

This sounds like you have no domain for your VS and that you are using the IP of the webmin (the host) server to try to put up a WP website. When you created the VS it requires a domain (a resolvable one). I understand that you do not want to use the “real” domain as that is hosted elsewhere but I am pretty sure you still require a resolvable domain. Of course I might be wrong (I use development “domains” like “mydomain.xyz” for just this purpose

Thank you for your answer, and yes, that must be the reason.
Should I register a new domain only for this developing purpose?

As I warned “I might be wrong”

so I would wait for a while to let others chime in.

It never does any harm (in my view) to register a spare domain for testing (especially if it can be obtained cheaply) I’ve always encouraged my clients to get them while they are on offer (not to wait and let others obtain them and potentially clone their sites for scamming/worse)

1 Like

@Stegan advice is very good and simple. A development domain is cheap, and very handy to have. Many registrars will offer a first year of some of their TLDs for only a few dollars.

Virtualmin install suggests you install on a sub of your domain (srv1.yourdomain.xxx) leaving your domain free. You can also can develop your WP on wp1.yourdomain.xxx, wp2.yourdomain.xxx or any sub you create.

The install script may ask you some questions. If your system does not have a fully qualified hostname, the script will ask you to provide one. The name of the system can be anything you want, but it must be fully qualified and should not match a name you’ll be hosting mail for. For example, if you have domain virtualmin.com you might name the server srv1.virtualmin.com or ns1.virtualmin.com. What name you choose is unimportant, but it must be fully qualified, it must not match a domain you’ll be managing in Virtualmin, and it must resolve, for several mail operations to work correctly.

1 Like

Thank you for the advice. I assumed that this needs to be an alias on the same server, is this correct?

I am not sure what you mean.

I am referring to going into your registrar and creating DNS records for your domain pointing to your IP. You can create any that are appropriate for your needs.

For example create a record (srv1) for yourdomain.xxx and (www.srv1) for yourdomain.xxx and (wp1) (www.wp1) (mail.wp1) etc. as you need.

Thank you, I’ll try

If you are using external DNS create all needed records at your registrar pointed to your server’s IP.

The process for using external DNS for VM is not step by step spelled out by VM but it is very simple after you figure it out. If you don’t want VM to handle DNS you have to tell VM not to by unclicking DNS domain > Features and Plugins. It will then stop trying to.

You then have to create all the needed records yourself. (VM tells you what you need to create under Server Configuration > Suggested DNS Records)

I prefer to not have my nameservers handled by VM because of the limitation of my own server with only one IP and one server. My registrar is easy to control DNS through and propagates almost as fast as changes are made is a plus. They also allow me to use there nameservers.

If you want Virtualmin to handle your DNS it will do a great job but I am not familiar with the process.

1 Like

Why not just add the domain to your computers HOST file and point to the IP of the server.
https://docs.rackspace.com/docs/modify-your-hosts-file

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.