code: def check_if_redirect(url):
      
      response = head(url, headers={'User-Agent': USER_AGENT})
      if response.status_code >= 300 and response.status_code < 400:
          return response.headers['location']
  
      return None
docs: checks if server redirects url