The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Google Page Indexing errors - duplicate pages (added slash, plus index.php?, etc.)
#1
I recently discovered that Google Search Console has a whole list of duplicate pages for pages on my site. Thankfully, they are not indexed, but I'm curious how to make the pages entirely unreachable.

In all cases, the canonical is correctly set to the first URL example, so that's good and probably why Google is not indexing the alternates, but making the alternate URLs unreachable will remove these indexing errors from Google Search Console.

In my settings, Use Fancy URLs is checked, and my Custom Permalink Structure is %parents%/%slug%

Correctly indexed URL:
https://www.mysite.com/about

Alternate, accessible URLs that I'd like to make inaccessible:
https://www.mysite.com/about/ (has an added trailing slash)
https://www.mysite.com/index.php?id=about
https://www.mysite.com/about?lang=en

As a test, I tried unremarking out the # define('GSCANONICAL', 1); line in gsconfig.php, but that broke my site entirely. Just trying to go to this /about page, the URL in my web browser changed to:
https://www.mysite.com/%parents%/about
which is not found... so I assume having "parents" vs "parent" in my custom permalink structure breaks if you have that GSCANONICAL setting enabled.

Ignoring that gsconfig.php setting above, I assume I'm able to handle these situations in my htaccess file, but I'm not great with editing this file, so maybe someone already has the code? What I assume is the relevant section that I currently have in my htaccess file is this:
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]

Thanks in advance for anyone who can help.
Reply




Users browsing this thread: 1 Guest(s)