URL, which automatically close tab

You can’t. JavaScript can only close tabs/windows that have been created by JavaScript on the same page for security reasons.

You could add a userscript that runs outside of page context and reacts to certain tags within the page, with Grease Monkey for example. But that would require the user to have that plugin + your script installed, it won’t “just work” if the open the page.