Reputation: 2009
I already have a website where :
1. www.example.com ---> is the desktop version (not-amp)
2. www.example.com/mobile ---> is the mobile version (not-amp)
In the index.htm page of the desktop version, I put :
<title>blo blo blo</title>
<meta name="description" content="bla bla bla">
<meta name="keywords" content="blu blu blu">
<link rel="alternate" media="only screen and (max-width: 1024px)"
href="http://www.example.com/mobile/index.php">
<script type="text/javascript">
<!--
if (screen.width <= 1024) {
window.location = "http://www.example.com/mobile/index.php";
}
//-->
</script>
And the index.php page of the mobile version, I put :
<title>blo blo blo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="bla bla bla">
<meta name="keywords" content="blu blu blu">
<link rel="canonical" href="http://www.example.com/index.htm">
Please don't ask me why I have index.htm in desktop version and index.php in mobile version as I myself already forget why I did that a few years ago :).
Anyway, it works. If I type "www.example.com" in the mobile's browser, then it shows "www.example.com/mobile/index.php" page. If I type "www.example.com" in the desktop's browser, then it shows "www.example.com/index.htm" page.
Now I want to add a new page in a subfolder, but I want to make just one version (which is an amp html page) instead of making two version for the desktop and the mobile.
I read from some articles in the internet that one amp html page is possible meant for both version (desktop and mobile) and from here it say:
AMP HTML files require a canonical link pointing to the regular HTML. If no HTML version exists, it should point to itself.
So, I assume that in this new amp html page in a subfolder, I should put the code something like this :
<link rel="canonical" href="http://www.example.com/jewelry/index.html">
Where that link is pointing to itself (the amp html index page in jewelry subfolder).
What I want here is something like this :
I've been looking around in the internet whether I can put a code in amp html page with meta name like below, but I cannot find it:
<meta name="description" content="bla bla bla">
<meta name="keywords" content="blu blu blu">
So, my question is :
Can I put meta name "description" and "keywords" in the amp html page ?
Any kind of respond would be greatly appreciated.
Thank you in advanced.
Upvotes: 0
Views: 497
Reputation: 3934
You need to put meta tag in main file non-amp page and also add the tag to make your page discoverable
<link rel="amphtml" href="http://www.example.com/mobile/index.php">
Upvotes: 0