/    Sign up×
Community /Pin to ProfileBookmark

How to force 410 errror

Hi everyone,

I have a site with a number of redundant links that I want removed from Google asap. I recently read about 410 errors, and came across the following code

Redirect gone /path/path/folder/
ErrorDocument 410 default

This is in the .htaccess file.

The pages I want removed are –

forensic-audio.com.au/about-us.html
forensic-audio.com.au/forensic-audio-restoration–audio-restoration–thank-you.html

can anyone help me with the code? I’m a complete newb at web development I’m afraid.

Thanks ?

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@ZorgMay 11.2017 — In your htaccess, this directive tells your server what to respond with when the page gets requested.

htaccess:
[CODE]
Redirect 410 /about-us.html
Redirect 410 /forensic-audio-restoration--audio-restoration--thank-you.html
[/CODE]


If you want to serve a custom error page. Assuming you have a directory; /error/ with 410.html inside, you would prepend this to htaccess:
[CODE]
ErrorDocument 410 /error/410.html
[/CODE]


now when someone goes to any of your defined redirects, they would see the /error/410.html page.

410.html would look something like:
[code=html]
<html>
<head>
<title>Page Gone - 410 Error</title>
</head>
<body>
<div>
<h1>Error 410 - Page deleted or gone</h1>
This might be because:
<ul>
<li>The page your looking for no longer exists or was deleted.</li>
</ul>
Please try the following instead:
<ul>
<li>Visit <a href="/">our home page</a> to see if it's available elsewhere.</li>
</ul>
</div>
</body>
</html>
[/code]
Copy linkTweet thisAlerts:
@qfgtyjjauthorMay 11.2017 — Hi ?

Thank you! That works perfectly.

Cheers
×

Success!

Help @qfgtyjj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.12,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...