SEO - moving subdomain to folder [closed] - .htaccess

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I am moving my blog from a sub-domain - blog.example.com to a sub-folder example.com/blog/
The URLs and the content are staying exactly the same.
What would be the best SEO-wise action to take, I was thinking the following:
Add rel="canonical" to sub-domain URLs and let the spiders crawl my pages to become aware of the new links.
Add a 301 redirect from sub-domain to sub-folder.
I understand that there's no point in having canonical if there's a 301 redirect.
Any help would be highly appreciated, thank You in advance!

The URLs are not staying the same. They are changing so you need to tell search engines and users where to find the content. 301 redirects are exactly what you want. They tell search engines where to find the new content and to update their indexes (plus Google will transfer PageRank) plus when users go to the old URL they are automatically redirected to the new URL which canonical URLs do not do.

Related

How to tell Google change the results to the new domain of my blogger website? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I have just moved my site to the new domain (from math2it.blogspot.com to math2it.com). However, I try to search on Google, there still be the old urls with domain "blogspot.com". How can I tell Google to change the results to "math2it.com"?
I have already changed in Webmaster Tools. I also went to this website to check the status of redirect. The answer is "Type of redirect: 301 Moved Permanently. Redirected to: math2it.com".
looks like you did everything needed to let Google know about the change.
Give it some time. Google will update your records, but not instantly

One website on two domains [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I have 2 domains:
www.first.com
www.second.com
Lets assume that In the first one I have an online store, at the second one I have only products of this store (seperate applications that running on the server).
The products link is
www.second.com/firstProduct
www.second.com/secondProduct
www.second.com/thirdProduct
and etc...
I want to redirect users to the first website when someone hit www.second.com, ie not the full product path.
What redirect should I use? 301? In terms of SEO what is the best approach?
Thanks.
Yes, the 301 Moved Permanently, is the code you want to return for this redirect. Search engines typically will queue up 301's for updates to their results, as this indicates that the resource will now be found at the new url, and that the old one is soon to be obsolete.
In your case, since you never want www.second.com/ to be accessed directly, the 301 is exactly what you want.
You might also consider adding a robots.txt file with allow + disallow statements in there, as most of the bots you actually care about for SEO will honor it.

Using .htaccess to redirect bots [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
So my website has a page called presets_pc.html, which dynamically loads content, and I want to redirect bots to presets_pc_fallback.php, which literally dumps the database on the page.
I'm pretty new to this stuff, and can't get RewriteRule to work; can you help me?
Thanks :)
The way you can tell whether a bot is accessing your site is through the User-Agent HTTP request header. Anyone can spoof what that is so there's no real guarantee. If you have a list of bots you want to affect, you can look up the "exclusion" user agents from a site like robotstxt and chain them into a RewriteCond match.
For example, google, infoseek, msn:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (googlebot|InfoSeek|msnbot) [NC]
RewriteRule ^/?presets_pc\.html$ /presets_pc_fallback.php [L,R]

Site Directory SEO [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
There might not be a right answer, so opinions are welcomed.
My site has a section for a product catalog /catalog and products are listed in that directory /catalog/product-name. Should associated files and images be visible as a sub-directory (/catalog/product-name/image/img1.png), in the same directory (/catalog/product-name/img1.png), or in a central directory (/images/img1.png)?
This is entirely for the sake of SEO structure since the images are stored as blobs in RAM and accessed using a Hash table.
Also, my initial goal was to allow the same image to be accessed using a multitude of names (ex: product-name-profile-shot.png would be an alias for img1.png), but with there being no form of canonical linking for images, do I run the risk of looking spammy if the same image appears in multiple locations with different urls?
As per my experience, URL structure really plays an important role in internet marketing. Structured data categorized based on theme are really helpful while you optimize your website for organic search. You can refer this simple static website that is organized in same way you mentioned yogacurious.com, just check categorization and its presence in Google search. User friendly categorization can result in better search presence !!
Regarding to image alias, i will not prefer to go for it. I recommend using same image with different alt tag by considering content and product page on which you are placing the link.
All the best
You absolutely do not need to alter the url structure of resources. URL structure of pages is important. Resource url structure is not, and will not affect SEO.
I wouldn't create aliases for images since there is no justification for doing so from an SEO perspective.

How to redirect a subdomain to another website? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I bought domain www.mydomain.com from godaddy.com. I hosted it at www.000webhost.com (free web-domain-hosting site). I created a subdomain subdomain.mydomain.com through ccpanel of 000webhost.
I want that subdomain to be diverted to my blog http://myblog.blogspot.in/
Right now I have a folder named subdomain in my root folder. What shall I upload in that folder so that It gets redirected to my blog?
Most domain name registrars provide a free redirection service, I think GoDaddy does too. Why not just do that?
If you want to get more technical, then redirection can be done (in code) in a few ways (in order of difficulty).
Frames. Welcome back to 1999-2002. Just put a static HTML <frameset> page up and load your target page in a whole-page frame. Your users will hate you.
<meta> redirection. Another staple from the late-1990s school of web design. Put <meta http-equiv="refresh" content="5;URL='http://example.com/'" /> in your HTML page.
Javascript redirection. In a <script> block in your page call window.location = "http://www.example.com";
Server-side redirection. All server-side redirections are done by setting the Location: HTTP header. How you do this depends on your server platform:
PHP: header('Location: http://www.example.com');
ASP: Response.Redirect("http://www.example.com") (also works for ASP.NET)
ASP.NET MVC: return Redirect("http://www.example.com"); (call inside Controller action method)
.htaccess: A bit more complicated. See the link below.
There's a whole load of redirections in a variety of platforms and languages here: http://www.webconfs.com/how-to-redirect-a-webpage.php/
You could technically use the Go Daddy subdomain forwarding function from within your Domain Manager. http://support.godaddy.com/help/article/4040/managing-a-domain-names-forwarded-subdomains
Once added, you will need to point an A record subdomain from where your DNS is actually hosted (www.000webhost.com) to the Go Daddy forwarding IP 64.202.189.170.
Use either a .htaccess file or create a PHP script with the following:
<?php
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://the-network-king.blogspot.in');
To create a 301 redirect.
and save the file under name index.php else it wont pick up file.
I am not familiar with www.000webhost.com, but if they are using cPanel, you should be able to do this very easily from within cPanel. Just select "Redirects" in the "Domains" section.
Having your site behind CloudFlare is a good idea to begin with, but if redirection is all you want, they offer "Page Rules"

Resources