A 301 redirect is a permanent redirect from one URL to another. A 302 redirect is a temporary redirect and should never be used as a replacement for a 301 permanent redirect.