In my site I have the page http://www.example.com/page.php , however, I have links leading to http://www.example.com/page.php#page so I want them not to be indexed or followed. Will it be correct to mark these links as
<a href="http://www.example.com/page.php#page" rel="noindex, nofollow">
Also, as a canonical meta tag on the same page I already have
<link rel="canonical" href="http://www.example.com/page.php" />
Thank you!!!
P.S: I ask if this syntax is right, not how Google works and what is its politic towards urls
The href attribute specifies the URL of the page the link goes to.
We can use Anchor tags to Link a Submit button to another page in PHP. We need to Write/Declare Submit button between Anchor tag's Starting and Closing tags. By using Anchor tag's href=”” attribute we can give a Path where we want to Link our Submit Button.
Alternatively referred to as a link and web link, a hyperlink is an icon, graphic, or text that links to another file or object. The World Wide Web is comprised of hyperlinks linking trillions of pages and files to one another. For example, "Computer Hope home page" is a hyperlink to the Computer Hope home page.
To make page links in an HTML page, use the <a> and </a> tags, which are the tags used to define the links. The <a> tag indicates where the link starts and the </a> tag indicates where it ends. Whatever text gets added inside these tags, will work as a link. Add the URL for the link in the <a href=” ”>.
You have invalid syntax in "rel" attribute. It must contain list of white-space separated keywords - remove the comma.
The "nofollow" keyword is correct. The "noindex" keyword does not make sense.
Edit: Clarification on request.
Proper syntax would be
<a href="http://www.example.com/page.php#page" rel="noindex nofollow">
But having "noindex" on the link does not make sense because this keyword obviously pertains to the linked page so it must be defined there for the whole page (in target's page's meta tag or robots.txt). There can be many links pointing to that page and SE would not know which link is right to claim "noindex" on target page...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With