-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
?/amp why are my amp pages like this #474
Comments
The question mark marks the beginning of a query string. Please refer to a simple explanation of query strings. From the WordPress.org plugin directory: |
With permalinks enabled you should have /amp, not "amp" as a GET parameter |
Make sure that permalinks are enabled in your site. And thanks for using the plugin :) |
Hi, I still get the question mark although i have permalinks enabled and my normal pages and posts have urls without question marks. And when i just type /amp et the end of my urls it goes 404. Can anybody help me on this? (example page-->seo hizmeti |
@emresque The query var is used for pages and any other non-hierarchical post type. Please see https://wordpress.org/support/topic/0-6-0-not-working-for-pages/#post-9903766 |
ah now i see, it is true that for blog posts i have normal urls without the question mark..good to know that it is ok from google's point of view..thanks for the information Weston! |
Hi Folks, I started using AMP at my wordpress website 4 days ago. In the first 2 days my amp pages were detected with /amp/ at the end. But since yesterday it has been changed to ?amp The problem is that website is now redirecting the browser at pages from /amp/ to the desktop url without amp. this is an example of a page: When you visit this url, the amp is not showing up. But there is an AMP version 100% sure. This is an example if a post and when you visit this url it's redirected to ?amp and that's an AMP version of the post. Could it be that my caching plugin wp-rocket or the google mod_pagespeed causes this problem? Because I started using them since yesterday. I am afraid that this will mess up my google indexing and that I will have duplicate pages for more that 2000 posts. When you search in google: site:coronavirusactueel.nl amp you can see that /amp/ is what google indexed. But these pages don't work anymore. Could somebody advice me what to do? Thanks! And greetings from the Netherlands. Ray |
@CVANL I presume you used a different AMP plugin previously? If you look at the source code of https://coronavirusactueel.nl/corona-kaart-nederland/ you'll see: <link rel="amphtml" href="https://coronavirusactueel.nl/corona-kaart-nederland/?amp"> So the AMP version of a page (or another hierarchical post type) does not end in Nevertheless a post like https://coronavirusactueel.nl/burgemeesters-bespreken-overlast-motorrijders/ has: <link rel="amphtml" href="https://coronavirusactueel.nl/burgemeesters-bespreken-overlast-motorrijders/?amp"> So for the AMP version of that post ends in Note that the inconsistency of URLs for posts and pages will be addressed in #2204 where we'll default to Google's index will update to to use the new AMP URLs. Nevertheless, I'm not sure why attempting to access https://coronavirusactueel.nl/corona-kaart-nederland/amp/ is redirecting to https://coronavirusactueel.nl/corona-kaart-nederland/ and not https://coronavirusactueel.nl/corona-kaart-nederland/?amp It's most likely because the AMP plugin doesn't even try to add the amp-wp/includes/amp-helper-functions.php Line 100 in 1d64124
Because of this, WordPress's own canonical redirects are kicking in. What you could in the short term while waiting for Google to re-index your pages is add a plugin that does this: namespace AMP_Register_Page_Endpoint;
function add_amp_endpoint() {
\add_rewrite_endpoint( amp_get_slug(), EP_PERMALINK | EP_PAGES );
}
register_activation_hook( __FILE__, function () {
flush_rewrite_rules( false );
add_amp_endpoint();
} );
add_action( 'init', function() {
add_amp_endpoint();
} ); I've added this to an existing extension plugin that deals with other aspects of AMP endpoint migration which you can use to do this: https://gist.github.com/westonruter/6b7d3b168711ee03c4ee29b68c3719b2 I've added a link to installation instructions in the comments. |
Try visiting Settings | Permalinks page of your dashboard to force a flush of rewrite rules. |
I have paid a computer person to install plugin and setup amp on my website. However to see the amp pages you have do
mydomain.com.au/?amp. not /amp. Why is this. I have not seen any other amp pages with the question mark ?
The text was updated successfully, but these errors were encountered: