-
xiyang0630
Hello,
Google Search Console has notified me about duplicate pages, but I found that these are search result pages generated when no content is found.
(1) I can’t locate this page. Could you tell me how to find its link or if I can add a canonical tag to this page? Or how can I solve this issue?
(2) By the way, can I adjust the position of the search box and the “Nothing Found” message? The text reads: “Sorry, but nothing matched your search terms. Please try again with some different keywords.” Where can I find this page or its elements?
Here’s the screenshot: https://postimg.cc/gallery/YG595s6
Best Regards,
Yang
-
Alvind
Hi there,
1. Are you using any SEO plugin? Most SEO plugins provide a way to set a canonical tag.
2. Right now, you’re using the default No Results page template. You can customize this by creating a new Block – Content Template element and setting the Display Location to No Search Results.
-
xiyang0630
Hello,
(1) Yes, I am using a SEO plugin, Rank Math SEO. But this is an element page not a post page, The SEO plugin doesn’t have a setting on the element page.
(2) Can I delete the original default no search result page tempalte, or can I link the newly created No Search Result block element to the mywebsite.com/search URL so they share the same result?
For privacy reasons, I’ve placed my website link in the private information field. You can check there to understand my point. “I can’t find the result”, and “the page displayed at mywebsite.com/search” shows a different interface, even though the content is the same (because I copied it from the default template).
-
Alvind
1) I don’t think it needs to be set on the Element page, since the element is only a template. However, I’m not too familiar with the SEO settings — it may be best to reach out to Rank Math for guidance, as I don’t want to suggest something I’m not certain about.
2) The
/searchpage is actually a 404 page. In that case, you’ll need to change the Display Location to 404 Template instead of No Search Results. -
xiyang0630
Hello Alvind,
Thank you for your quick response.
(1) I have already contacted the Rank Math SEO team.
(2) I understand what you mean, Alvind, but that search page is actually my 404 page, it just looks like a “No Result” page. Can I manually change the content and layout of this 404 page that looks like the “No Search Result” page? How can I locate and find it, then edit and modify it?
-
Alvind
Ah, okay. In that case, you’ll need to delete or set the existing 404 Page element to draft.
Then edit the existing No Results Page element and, under Display Rules > Location, add the 404 Template location. This way you don’t need to create a new element if the layout is the same.
I’m assuming you previously created the 404 page and No Search Results elements manually, since the default starter site you’re using doesn’t include elements for those templates.
-
xiyang0630
Thank you for your reply, Alvind.
I later solved the issue. I hadn’t created a 404 Page Block Element before, so I created a new 404 Block Element and set the Location Rule to the 404 Page.
It’s the same method you just mentioned.
However, I still want to ask: when I don’t set a top padding or top margin for the newly created block element, it appears directly at the menu area and overlaps the menu content.
The Block Template doesn’t seem to have a setting like a hook, where I can place the created content under specific modules, such as right below the menu.
Thank you again for your help, Alvind.
-
Alvind
The issue here is that you’re using the header merge layout. In this case, you need to add a top padding so the content doesn’t overlap with the navigation.
An alternative would be to exclude the 404 page from the Header Merge layout element.
-
xiyang0630
Hello Alvind,
I understand GeneratePress better right now.
Thank you for your response!
-
Alvind
Glad to hear that!
- You must be logged in to reply to this topic.