I have a website on WordPress with a responsive theme. It is located on my server hosted by Apache. Everything works well when I access the website with its IP address. The problem is when I try forward my domain to this address.
I have two options on my domain control panel:
Forward
example.comon IP addresshttp://192.0.2.1:8080/websiteResult: When I typeexample.comin browser I see theexample.comURL but the website does not load corectly on smartphonesForward 301
example.comon IP addresshttp://192.0.2.1:8080/websiteResult: Typeexample.com, website loads corectly on mobiles but in url I seehttp://192.0.2.1:8080/websitewhere I wanted to seeexample.com
I know that in the first case the problem is that domain forwarding adds iframe to site and that is why the responsive view does not load.
I want to use 301 zforwarding and mask the URL with example.com. How can I achieve this on WordPress?