Generate canonical URL tags to prevent duplicate content issues. Supports self-referencing and cross-domain canonicals.