Links are redirecting to Private IP

I found this thread which is the issue that I’m facing

But I’m unsure where to make the change, which file(s) needs this line of code

URL::forceRootUrl( Config::get(‘app.url’) );


Are these links to invoices that are showing the private IP?

from when you click the next button it will redirect to

or from emails when you click to view invoice it gives url but then redirects to

ok, so if the links are correct in the emails, then something in your setup is rewriting those URLs.

as I stated in my original post the issue is the same issue

but i’m unsure where you change

  • Laravel uses the $_SERVER variable to determine the URL, it may be useful to check its value to narrow down the problem.
  • You may be able to fix this by checking that APP_URL is correct in the .env file in the root folder and then adding the following line of code to the top of app/Http/routes.php

URL::forceRootUrl( Config::get(‘app.url’) );

any advice @hillel or @david

Just to confirm,

have you set TRUSTED_PROXIES=* in your .env file and update the config?