Fixes #4529 - foreman.url option and SRV

Not tested yet, I am going to test after the discussion.