When I click on a link to download a file, IDM opens two download dialog boxes instead of one. If I cancel one of downloads, IDM thinks it has taken over the download by mistake, and offers to exclude the site in the future. How do I fix it?

Probably this web page has a specific behavior in browsers. If the page sees that no downloads are started in your browser, it tries to restart the download, and IDM takes over the same download several times.

You can add this web site to exceptions in "IDM Options→File types" IDM dialog. Press "Edit List", then press "Add" and then type name of a site ("*.thesitename.com" for example). IDM will not catch downloads from this site anymore.