[PYTHON] If you get lost with HTTP redirects 301 and 302

From the SEO side, 302 and 301 redirects need to be clearly used properly.

Difference between 301 redirect and 302 redirect

301 ... permanent redirect 302 ... Temporary redirect

Which one should I use this time?

** "Is there a possibility that the redirect set for that page will be canceled in the future?" ** If the answer is NO, then 301, if YES, then 302.

As an example 301 ... Page move (URL change), page deletion 302 ... Maintenance screen, error screen Such.

Why is it necessary to use them properly?

In particular, you need to be careful when relocating the site. You should do it with 301, but if you set it to 302, there is a possibility that SEO-important status such as page rank will disappear.

Recommended Posts

If you get lost with HTTP redirects 301 and 302
What to do if you get lost in file reference with FileNotFoundError
Compare HTTP GET / POST with cURL (command) and Python (programming)
What to do if you get a UnicodeDecodeError with pip install
Read this if you get SSL related errors with pip install! !! !!
If you get angry with "too few updates ~" when running LdaModel
What to do if you get a TypeError with numpy min, max
What to do if you get Could not fetch URL 443 with pip
Workaround if you get an error when trying to install PySide with pip
What to do if you get angry with swapon failed: Operation not permitted
What to do if you get an error when installing python with pyenv
Get git branch name and tag name with python
[python] [vscode] When you get angry with space-tab-mixed
What are you comparing with Python is and ==?
Get only Response Header with curl and wget
Get Gmail subject and body with Python and Gmail API
Get temperature and humidity with DHT11 and Raspberry Pi
What to do if you get an OpenSSL error when installing Python 2 with pyenv
What to do if you get an Import Error when importing matplotlib with Jupyter
If you can't send an email with python smtplib and have trouble, command line
What to do if you run python in IntelliJ and end with an error
If you get stuck when building pycocoapi on Windows
Get media timeline images and videos with Python + Tweepy
Get comments on youtube Live with [python] and [pytchat]!
Get comments and subscribers with the YouTube Data API
Get twitter tweets, followers, followers, likes, with urllib and beautifulSoup
[Python] Get user information and article information with Qiita API
What you can and cannot do with Tensorflow 2.x
* Android * [HTTP communication_2] HTTP communication with Flask (hit WebAPI [GET, POST])
What to do if you get Swagger-codegen in python and Import Error: No module named
What to do if you get an Undefined error when trying to use pip with pyenv