-
-
Notifications
You must be signed in to change notification settings - Fork 1
Description
https://search.google.com/search-console/
Description: There are pages on the SciGrade website that return a "Not found (404)" error, preventing them from being indexed or served by Google. An example of a page affected by this issue is https://scigrade.com/core/about.html, which is currently not indexed and returns a 404 error according to Google Search Console.
Objective: Identify and resolve 404 errors on the site to ensure that the pages are indexed by Google and available to users. This involves correcting broken links, ensuring the proper pages exist, or removing incorrect references.
Approach:
Audit the website and review all reported 404 errors in Google Search Console.
Identify if the affected pages (e.g., /core/about.html) are expected to exist or if they are legacy/incorrect URLs.
If the page is supposed to exist, restore it or create the appropriate page.
If the URL is invalid, remove references to it from the site and ensure the correct URLs are linked.
Implement 301 redirects where applicable to guide users and search engines to the correct URLs.
Re-submit affected URLs for indexing through Google Search Console after the fix.
Reproducible Steps:
Go to Google Search Console
Check the “Pages” section for the "Not found (404)" errors.
Visit the affected URL, such as https://scigrade.com/core/about.html, and confirm that it returns a 404 error.
Check the website codebase or CMS to determine if the URL should exist or if it is a broken link.
Apply the appropriate fix (restoring page, removing references, adding redirects).
Test Cases:
Write Jest unit tests to ensure that any URL referenced in the application exists and does not lead to a 404 error.
Use Cypress e2e testing to navigate to the URLs mentioned in Google Search Console and validate that they return the correct page or a 301 redirect.
Example Test Case (Jest):
javascript
Copy code
test('should not return 404 for valid page URLs', async () => {
const response = await fetch('/core/about.html');
expect(response.status).not.toBe(404);
});
Example Test Case (Cypress):
javascript
Copy code
describe('Check if all important pages load successfully', () => {
it('should visit the About page and not encounter a 404 error', () => {
cy.visit('/core/about.html');
cy.get('h1').should('contain', 'About Us'); // Verify page loads correctly
});
});
Acceptance Criteria:
No pages return a "Not found (404)" error after the fixes are applied.
Any legacy or incorrect URLs are properly redirected or removed.
Google Search Console no longer reports 404 errors for the affected URLs.
All important pages (such as the About page) are correctly indexed by Google.