Is It Possible To Tell Web Crawlers Two Domains Point To The Same Place Without Using A 301 Redirect?
I have two domains that point to the same sever and I'd like to keep it so that a user can go to either of these URLs and the URL will remain as typed in the browser's address bar ("redirecting" would be ok as long as browsers keep the original url visible). But I've read that this can be bad for SEO.
Is there some way to tell seach engines that two domains point to the same place (perhaps in robots.txt tho that's not looking promising). Basically I'd like a 301 redirect used for just web crawlers.
I could try detecting when an http request is coming from a crawler and redirecting them, but I haven't seen a standard way to do this.
You can use a link element in the HTML head with a rel attribute of "canonical", which then will indicate to web browsers that the "real" domain is whatever you set the href attribute to.
<link rel="canonical" target="_blank" rel="nofollow noreferrer" href="http://www.example.com/your-other-site-with-identical-content">
The fact that google has supported this for such a long time (from 2009 to present) is a strong indicator that this may be the way to go.
- → How to access the Visual interface for October?
- → How to implement DbDongle::convertTimestamps as workaround of invalid timestamps with MySql strict
- → Laravel 5: Apache php http authentication
- → Trait 'IlluminateFoundationBusDispatchesJobs' not found
- → Disable CSRF TokenMismatch for specific routes on Lumen
- → Change fill color of d3.js node
- → Authenticate with a cookie using laravel 5.1 and jwt
- → What is causing the web page to reload?
- → Is there any way to make an SVG object clickable?
- → Keeping uploaded files secure but still available via https
- → CORS missmatch because of http
- → 500 Internal Server Error Ajax Laravel
- → React: How to publish page on server using React-starter-kit