Handle invalid URLs