Google search is not picking up correct URL

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Scam Warning
nwh10
Registered User
Posts: 31
Joined: Sat Oct 07, 2023 2:23 pm

Google search is not picking up correct URL

Post by nwh10 »

In early March, we moved our phpBB forum to a new domain. For the most part, the migration went fine. But there are problems with Google search.

The Search Console reports thousands of indexing problems due to failed redirects and "alternate page with proper canonical tag":
seo problem 1.png

Here's an example of the details:

seo problem 2.png

I see the problem, but I don't know how to fix it.
Each of these links goes to index.php instead of viewtopic.php.

Example:
https://albinowners.net/aog/index.php?t=12758 takes you to the main page.
The correct link is https://albinowners.net/aog/viewtopic.php?t=12758.

We are using Prosilver. Overall_header.html and viewtopic.php appear to be unmodified.
I've read https://www.semrush.com/blog/canonical-url-guide/, but it doesn't give me clear guidance to correct the problem.

I'd welcome any suggestions.
You do not have the required permissions to view the files attached to this post.
Last edited by Mick on Sat Apr 06, 2024 7:45 am, edited 1 time in total.
Reason: Solved.
nwh10
Registered User
Posts: 31
Joined: Sat Oct 07, 2023 2:23 pm

Re: Google search is not picking up correct URL

Post by nwh10 »

Hmmm. It's been a few days with no replies. Maybe I need to be more patient. Or maybe I need to look for the answer elsewhere. But I don't know where. Do I need to find a webmaster? Mine is tied up for a while with family health problems.

Thanks for any guidance.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6222
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Google search is not picking up correct URL

Post by thecoalman »

If you hover over a URL there is a magnifying glass that will give you information. What is the referring page for one of the index.php?t=123456 URL's?

Taking a wild guess there is redirect on the old domain and it's not formed properly.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
nwh10
Registered User
Posts: 31
Joined: Sat Oct 07, 2023 2:23 pm

Re: Google search is not picking up correct URL

Post by nwh10 »

Thanks for that clue, Coalman. Wild guesses are good. Yes, there's a redirect on the old domain, and I'm trying to find out exactly where it's located so that I can look at it.

When you suggest hovering over a URL, do you mean in the Google Search Console shown in the screenshots? The referring page is the same as the displayed problem:

seo problem 3.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6222
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Google search is not picking up correct URL

Post by thecoalman »

Click the magnify glass icon in highlighted link. It will tell you where it's being redirected from. For the index.php?p=123456 it's probably olddomain.com/viewtopic.php?p=123456

The redirect is likely from .htaccess file on the old domain, when you move content to a new domain or different directory on same domain it's what you want to do but it needs to be done correctly.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
nwh10
Registered User
Posts: 31
Joined: Sat Oct 07, 2023 2:23 pm

Re: Google search is not picking up correct URL

Post by nwh10 »

Ah, the magnifying glass!
Ugh, no joy:
seo problem 4.jpg
It's a perfect illustration of the problem.
The URL is https://albinowners.net/aog/index.php?p=52373.
If I change "index" to "viewtopic", the URL works fine.
https://albinowners.net/aog/viewtopic.php?p=52373

I hear you on making the corrections properly in .htaccess.
You do not have the required permissions to view the files attached to this post.
Last edited by nwh10 on Thu Apr 04, 2024 12:11 am, edited 1 time in total.
User avatar
AmigoJack
Registered User
Posts: 6116
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Google search is not picking up correct URL

Post by AmigoJack »

nwh10 wrote: Thu Apr 04, 2024 12:04 amI hear you on making the corrections properly in .htaccess.
For that you have to post the content of it first. Most likely it's set up wrong, so it just redirects to index.php instead of viewtopic.php.
nwh10 wrote: Thu Apr 04, 2024 12:09 am[delete duplicate]
Click on the report button on your posts (the exclamation mark on the top right), select the appropriate reason (f.e. "duplicate post" or "does not fit") and then enter what a moderator should do in your opinion (f.e. deleting the post). Moderators don't read every topic on every forum - you have to bring an issue to their attention by reporting it (elsewhere this is known as "opening a ticket").
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2433
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦

Re: Google search is not picking up correct URL

Post by P_I »

AmigoJack wrote: Thu Apr 04, 2024 12:19 pm
nwh10 wrote: Thu Apr 04, 2024 12:04 amI hear you on making the corrections properly in .htaccess.
For that you have to post the content of it first. Most likely it's set up wrong, so it just redirects to index.php instead of viewtopic.php.
I have found the tool htaccess tester - madewithlove very helpful for offline testing/debugging problems such as this. It has saved my bacon on more than one occasion before I actually implemented ReWrite rules. Disclosure: I have no affiliation with the site, I am just a very happy user of the functionality it provides.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
nwh10
Registered User
Posts: 31
Joined: Sat Oct 07, 2023 2:23 pm

Re: Google search is not picking up correct URL

Post by nwh10 »

P_I - thank you for the link to the .htaccess testing tool.

AmigoJack, I agree that the clues are pointing to a problem with the .htaccess redirect. You suggested that I post the contents.

Background:
Old domain is https://albinowners.com.
New domain is https://albinowners.net.
File organization is the same in both domains.
Each domain contains two occurrences of .htaccess.
The first resides in the public_html directory.
The second resides in public_html/aog.

Test results:
1. Applying rule to https://albinowners.com
A. public_html/.htaccess rule: RewriteRule ^/?$ "http\:\/\/www\.albinowners\.net\/aog\/index\.php" [R=301,L]
htaccesstest 1.jpg
B. public_html/aog/.htaccess rule: RewriteRule ^(.*)$ http://albinowners.net/aog/index.php [R=301]
htaccesstest 2.jpg
2. Applying rule to https://albinowners.net
A. public_html/.htaccess rule: RewriteRule ^/?$ "http\:\/\/www\.albinowners\.net\/aog\/index\.php" [R=302,L]
htaccesstest 3.jpg
B. public_html/aog/.htaccess rule: RewriteRule ^(.*)$ https://albinowners.net/aog/$1 [R=301,L]
htaccesstest 4.jpg
I very much appreciate everyone's help. My web guy is unavailable due to a very grave family illness.
You do not have the required permissions to view the files attached to this post.
User avatar
AmigoJack
Registered User
Posts: 6116
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Google search is not picking up correct URL

Post by AmigoJack »

Instead of

Code: Select all

^(.*)$ http://albinowners.net/aog/index.php [R=301]
make it

Code: Select all

^(.*)$ http://albinowners.net/aog/$1 [R=301]
because otherwise even /ucp.php becomes /index.php.

Start trying to format your posts with BBCode, especially on code portions and when you have lists.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
nwh10
Registered User
Posts: 31
Joined: Sat Oct 07, 2023 2:23 pm

Re: Google search is not picking up correct URL

Post by nwh10 »

Thank you, AmigoJack! I've made the change and of course it works perfectly.
You're my hero! I really appreciate your help with this.

Return to “phpBB Discussion”