Task: Clean up old pages like /templates?page=4&topics-page=137
Clean up old pages like /templates?page=4&topics-page=137
17.06.2026fi1osof.ru
There are a lot of such pages in the Yandex index and they are clearly not needed there. We need to return the "Gone" (410) header.
Ворклоги
Added a page with the server header "Gone Forever".
import { useEffect } from 'react'
import { useRouter } from 'next/router'
import { Page } from 'src/components/pages/_App/interfaces'
export const Redirect410Page: Page = () => {
const router = useRouter()
useEffect(() => {
const timer = setTimeout(() => {
router.push('/')
}, 3000)
return () => clearTimeout(timer)
}, [router])
return (
<div>
<h1>Gone Forever</h1>
<p>
The page has been removed.
<br />
You will be redirected to the main page in 3 seconds...
</p>
</div>
)
}
Redirect410Page.getInitialProps = async ({ res }) => {
if (res) {
res.statusCode = 410
}
return {}
}