M
M
Michael R.2018-08-23 15:31:18
Search Engine Optimization
Michael R., 2018-08-23 15:31:18

How to properly process a non-existent page?

Greetings!
A friend made a website and on the first viewing I noticed an interesting moment with 404 pages. When you visit any page - displays the contents of the main. Those. no matter what url we specify - always the content of the main one.
Do I understand correctly what is needed?:
1. When determining that the specified page does not exist, then you need to make a 302 redirect to the prepared 404 page.
2. Close the 404 page from indexing through robots.txt.
How to deal with 404 pages in general?
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Topodin, 2018-08-23
@Mike_Ro

You just need to make the response code of non-existent pages 404, not 200. You can check the response code here www.bertal.ru

A
Anton, 2018-08-23
@Eridani

In simple terms: For some url, you are dragging information from the database that should be on this page.
If no results were returned when requesting some url, then we give 404 headers and a template, they say, sorry, senion, the page is such a nEma.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question