Referring the comment from #4 change default filename as the "page" part of the url. If no such path, then use the domain part as it is now. Example: 1. https://domain.ltd/article-a-b-c ➡️ article-a-b-c.pdf 1. https://domain.ltd ➡️ domain.pdf