Get Referer Url in Magento 2.

Magento 2, Get Referer url by calling function getRefererUrl() or getRedirectUrl() from RedirectInterface Object.

Magento core Interface, Magento\Framework\App\Response\RedirectInterface used for fetch Referer URL.

In PHP you can call simply by, $_SERVER["HTTP_REFERER”], In Magento 2 Best Practice, you need to call RedirectInterface in your __construct() function and get referrer URL.