detect non-origin links better