Wordpress & trailing slash on domain name
-
Hi recently changed my site so it is based on Wordpress, got my preferred domain set in Google webmaster as
but since moving to wordpress my domain is now having a slash put on the end of it like
Most of the links going to my homepage do not have the slash on the end so am I right in thinking I should get rid of the slash from my site so I have one consistent url?
If so any ideas how to banish the slash? Cannot seem to do it through the Wordpress general settings (despite preferred domain being set as www.domain.co.uk !)
Thanks
T
-
Takeshi, that was great thank you
-
Try this:
<code># BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule (.+)/$ $1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] IfModule></code>
-
Think it is a HTAccess issue, just opened it up and I have the following, do I just strip out the trailing slash on
RewriteBase /newsite/ or do I have to strip out a few more?
Don't like messing with my hataccess so any help to point me in the right direction would be great!
# BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On RewriteBase /newsite/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /newsite/index.php [L]</ifmodule> # END WordPress
-
Good point!
Just checked and www.domain.co.uk redirects to www.domain.co.uk/
This a htaccess issue perhaps?
-
Does www.domain.co.uk redirect to www.domain.co.uk/ or are they treated as separate pages?
-
Self hosted!
I have set it as www.domain.co.uk in the settings but for some reason it is still showing with the slash when I view the site
-
Are you on self hosted Wordpress or wordpress.com? Usually on self hosted you can edit the URL under general options.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Can Robots.txt on Root Domain override a Robots.txt on a Sub Domain?
We currently have beta sites on sub-domains of our own domain. We have had issues where people forget to change the Robots.txt and these non-relevant beta sites get indexed by search engines (nightmare). We are going to move all of these beta sites to a new domain that we disallow all in the root of the domain. If we put fully configured Robots.txt on these sub-domains (that are ready to go live and open for crawling by the search engines) is there a way for the Robots.txt in the root domain to override the Robots.txt in these sub-domains? Apologies if this is unclear. I know we can handle this relatively easy by changing the Robots.txt in the sub-domain on going live but due to a few instances where people have forgotten I want to reduce the chance of human error! Cheers, Dave.
On-Page Optimization | | davelane.verve0 -
Image File Names for eCommerce?
Hi everyone! I'm wondering about naming my product photo file names for an E-Commerce site. Let's say I say have product named Abe Lincoln in the **Print **category for sale with 4 images, relatively similar but from different views for example.Could I name them as follows? 1) abe-lincoln-print.jpg 2) abe-lincoln-print-side-view.jpg 3) abe-lincoln-print-close-up.jpg 4) abe-lincoln-print-font-view.jpg Or is that too many keywords for the page? Should I be worried about keyword stuffing? Plus once I add in title and alt tags and descriptions this could also increase the keyword count for "abe lincoln print"?
On-Page Optimization | | TheFlyingSweetPotato0 -
Assigning Locations to Wordpress from SEO Perspective?
I am looking for a way to split up and assign my 400 Wordpress posts to my business' four separate office locations. The four offices are in four separate areas with distinct city names. What way makes the most sense from an SEO perspective - assigning the city names as categories? adding the location as a tag, or some other way that I haven't considered? Currently, all posts are categorized by content and have no mention of location. Happy to answer any questions you might need in order to answer. Thank you!
On-Page Optimization | | SDSLaw0 -
Opinions please on Duplicate page titles & too many on-page links warnings.-
Hello folks, I'm a total SEO newbe but totally enjoying
On-Page Optimization | | CSC
using SEOmoz to learn more. We have ecommerce sites and the 1st crawl flags – as appears typical too many on-page links. We display up to 20 products (each with three links!)
and I’m trying to push to have fewer but meeting resistance from colleagues.
We have links duplicated all over the site believing it eases navigation. My question is just how critical is the number of products displayed
and the resulting volume of links to SEO results? Also we currently have collections of products displayed
across several pages which of course have the same page title and this is flagged
as a duplication error. I wonder if product auto-scrolling help as this means only a certain number of products are displayed at one time on one page thus reducing links and the need for duplicate page titles? My superiors are resisting change (perhaps nervous of spoiling
what already works) and I need to know where to direct my persuasive powers! Many thanks in anticipation, Spence0 -
I have 90 domains at Godaddy and would like to transfer them to a new registrar - Moniker
Will the the transfer to a new registrar hurt my domains in the SERPs if all contact information for the domain stays the same and DNS stays the same and site hosting remains the same?
On-Page Optimization | | jeff.interactive0 -
Installing a site on top level domain directory VS deeper directory
How important it is for seo to install a site on a top level directory vs deeper directory? example: www.mysite.com VS www.mysite.com/catalog many eCommerce scripts such as oscommerce and cre loaded will install by default to /catalog and that's what I've been doing for most of my customer. does it mean it will be harder for them to get good seo results? Thanks in advance for the input...
On-Page Optimization | | zigi0 -
Image file name, is it important
If I use the same image all over my site, do I need to change the file name to avoid duplicate? Different alt text will be use on those images
On-Page Optimization | | BigBlaze2050 -
URL with two forward slashes //
We have a potential client with a URL structure in this fashion: http://www.site-url.com//cpage/page.html pretty strange, right? my question is: How bad are the 2 forward slashes // for SEO? How bad is it to have that extra layer of /cpage in the URL? this doesn't appear to serve any other purpose than making the URL longer than necessary.
On-Page Optimization | | Motava0