301 better than 302 for seo code example Example: 301 and 302 redirect 301 redirect is a permanent redirect 302 redirect is a temporary redirect