Welcome to WebmasterWorld Guest from 220.127.116.11
I was considering putting a 404 on all of them instead, which would send the user to a custom 404 page.
However, I have been reading that the 301 tells Google that the page doesn't exist, remove the link from the index and permanently redirect the user.
Wouldn't a 404 tell Google the same thing? That the page doesn't exist anymore? The user would hit a custom page that lets them know this.
Which one is best for SEO purposes? The 404 seems more user friendly, while the 301 seems more SE friendly.
Do i reference all my pages that are 404 in an htaccess file with "ErrorDocument 404"?
If so, would a 404 reference in an htaccess file take precendent over the fact that the files still exist in the directory? (they are just not beeing linked to anywhere and therefore not used.
There is a misunderstanding here.
If the file still exists then it will be served with a "200 OK" reponse and the content indexed (unless you put a meta robots noindex tag on the page).
If there is a 301 redirect for that URL declared in the .htaccess file then that file can not in fact be accessed. The redirect is served first, and the browser then requests the new URL that it was told to ask for.
The server can only give a 404 response if the requested file is NOT found on the server.
The ErrorDocument directive tells the server to show the content of the named file, instead of the standard "Error 404 - Page not Found" message that is built in to the system.
The format is:
ErrorDocument 404 /my.error.message.page.html