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.com
on IP addresshttp://192.0.2.1:8080/website
Result: When I typeexample.com
in browser I see theexample.com
URL but the website does not load corectly on smartphonesForward 301
example.com
on IP addresshttp://192.0.2.1:8080/website
Result: Typeexample.com
, website loads corectly on mobiles but in url I seehttp://192.0.2.1:8080/website
where 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?