Programmatically fetch canonical URL